Documentation ¶
Overview ¶
Package testsetups compresses common test setups and more complicated setups like performance and chaos tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeeperBlockTimeTest ¶
type KeeperBlockTimeTest struct { Inputs KeeperBlockTimeTestInputs TestReporter testreporters.KeeperBlockTimeTestReporter // contains filtered or unexported fields }
KeeperBlockTimeTest builds a test to check that chainlink nodes are able to upkeep a specified amount of Upkeep contracts within a certain block time
func NewKeeperBlockTimeTest ¶
func NewKeeperBlockTimeTest(inputs KeeperBlockTimeTestInputs) *KeeperBlockTimeTest
NewKeeperBlockTimeTest prepares a new keeper block time test to be run
func (*KeeperBlockTimeTest) Run ¶
func (k *KeeperBlockTimeTest) Run()
Run runs the keeper block time test
func (*KeeperBlockTimeTest) Setup ¶
func (k *KeeperBlockTimeTest) Setup(env *environment.Environment)
Setup prepares contracts for the test
func (*KeeperBlockTimeTest) TearDownVals ¶
func (k *KeeperBlockTimeTest) TearDownVals() (*environment.Environment, *blockchain.Networks, []client.Chainlink, testreporters.TestReporter)
Networks returns the networks that the test is running on
type KeeperBlockTimeTestInputs ¶
type KeeperBlockTimeTestInputs struct { NumberOfContracts int // Number of upkeep contracts KeeperRegistrySettings *contracts.KeeperRegistrySettings // Settings of each keeper contract Timeout time.Duration // Timeout for the test BlockRange int64 // How many blocks to run the test for BlockInterval int64 // Interval of blocks that upkeeps are expected to be performed CheckGasToBurn int64 // How much gas should be burned on checkUpkeep() calls PerformGasToBurn int64 // How much gas should be burned on performUpkeep() calls ChainlinkNodeFunding *big.Float // Amount of ETH to fund each chainlink node with }
KeeperBlockTimeTestInputs are all the required inputs for a Keeper Block Time Test
type OCRSoakTest ¶
type OCRSoakTest struct { Inputs *OCRSoakTestInputs TestReporter testreporters.OCRSoakTestReporter // contains filtered or unexported fields }
OCRSoakTest defines a typical OCR soak test
func NewOCRSoakTest ¶
func NewOCRSoakTest(inputs *OCRSoakTestInputs) *OCRSoakTest
NewOCRSoakTest creates a new OCR soak test to setup and run
func (*OCRSoakTest) Setup ¶
func (t *OCRSoakTest) Setup(env *environment.Environment)
Setup sets up the test environment, deploying contracts and funding chainlink nodes
func (*OCRSoakTest) TearDownVals ¶
func (t *OCRSoakTest) TearDownVals() (*environment.Environment, *blockchain.Networks, []client.Chainlink, testreporters.TestReporter)
Networks returns the networks that the test is running on
type OCRSoakTestInputs ¶
type OCRSoakTestInputs struct { TestDuration time.Duration // How long to run the test for (assuming things pass) NumberOfContracts int // Number of OCR contracts to launch ChainlinkNodeFunding *big.Float // Amount of ETH to fund each chainlink node with RoundTimeout time.Duration // How long to wait for a round to update before failing the test ExpectedRoundTime time.Duration // How long each round is expected to take TimeBetweenRounds time.Duration // How long to wait after a completed round to start a new one, set 0 for instant StartingAdapterValue int }
OCRSoakTestInputs define required inputs to run an OCR soak test