testsetups

package
v1.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: MIT Imports: 14 Imported by: 1

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

Setup prepares contracts for the test

func (*KeeperBlockTimeTest) TearDownVals

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) Run

func (t *OCRSoakTest) Run()

Run starts the OCR soak test

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL