configtest

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RootDir the root directory for test
	RootDir = "/tmp/chainlink_test"
	// DefaultPeerID is the peer ID of the default p2p key
	DefaultPeerID = "12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X"
)
View Source
const (
	HeadSamplingIntervalInTest = 0 * time.Millisecond // Head sampling disabled
)

Variables

View Source
var (
	MinimumContractPayment = assets.NewLink(100)
)

Functions

This section is empty.

Types

type EVMConfigOverrides

type EVMConfigOverrides struct {
	EvmLogBackfillBatchSize null.Int

	BlockHistoryEstimatorBlockDelay       null.Int
	BlockHistoryEstimatorBlockHistorySize null.Int
	EvmFinalityDepth                      null.Int
	EvmMaxGasPriceWei                     *big.Int
	EvmGasBumpPercent                     null.Int
	EvmGasBumpTxDepth                     null.Int

	EvmGasLimitDefault null.Int

	EvmHeadTrackerHistoryDepth       null.Int
	EvmGasBumpWei                    *big.Int
	EvmGasLimitMultiplier            null.Float
	EvmGasPriceDefault               *big.Int
	EvmHeadTrackerSamplingInterval   *time.Duration
	EvmHeadTrackerMaxBufferSize      null.Int
	EthTxResendAfterThreshold        *time.Duration
	EvmNonceAutoSync                 null.Bool
	EvmRPCDefaultBatchSize           null.Int
	FlagsContractAddress             null.String
	GasEstimatorMode                 null.String
	MinRequiredOutgoingConfirmations null.Int
}

type GeneralConfigOverrides

type GeneralConfigOverrides struct {
	KeeperRegistrySyncInterval         *time.Duration
	BlockBackfillDepth                 null.Int
	KeeperMinimumRequiredConfirmations null.Int
	KeeperMaximumGracePeriod           null.Int

	LogLevel         *config.LogLevel
	LogSQLStatements null.Bool

	BlockBackfillSkip null.Bool
	AllowOrigins      null.String

	AdminCredentialsFile null.String
	AdvisoryLockID       null.Int

	ClientNodeURL                             null.String
	DatabaseURL                               null.String
	DatabaseTimeout                           *time.Duration
	DefaultHTTPAllowUnrestrictedNetworkAccess null.Bool
	DefaultHTTPTimeout                        *time.Duration
	DefaultMaxHTTPAttempts                    null.Int
	Dev                                       null.Bool
	Dialect                                   dialects.DialectName
	EthereumDisabled                          null.Bool
	FeatureExternalInitiators                 null.Bool
	LogToDisk                                 null.Bool
	OCRBootstrapCheckInterval                 *time.Duration
	OCRKeyBundleID                            null.String
	OCRObservationGracePeriod                 *time.Duration
	OCRObservationTimeout                     *time.Duration
	OCRTransmitterAddress                     *ethkey.EIP55Address
	P2PBootstrapPeers                         []string
	P2PListenPort                             null.Int
	P2PPeerID                                 *p2pkey.PeerID
	SecretGenerator                           config.SecretGenerator
	TriggerFallbackDBPollInterval             *time.Duration
	// contains filtered or unexported fields
}

func (*GeneralConfigOverrides) SetChainID

func (o *GeneralConfigOverrides) SetChainID(id int64)

func (*GeneralConfigOverrides) SetDefaultHTTPTimeout

func (o *GeneralConfigOverrides) SetDefaultHTTPTimeout(d time.Duration)

func (*GeneralConfigOverrides) SetOCRBootstrapCheckInterval

func (o *GeneralConfigOverrides) SetOCRBootstrapCheckInterval(d time.Duration)

func (*GeneralConfigOverrides) SetOCRObservationGracePeriod

func (o *GeneralConfigOverrides) SetOCRObservationGracePeriod(d time.Duration)

func (*GeneralConfigOverrides) SetOCRObservationTimeout

func (o *GeneralConfigOverrides) SetOCRObservationTimeout(d time.Duration)

func (*GeneralConfigOverrides) SetTriggerFallbackDBPollInterval

func (o *GeneralConfigOverrides) SetTriggerFallbackDBPollInterval(d time.Duration)

type TestEVMConfig

type TestEVMConfig struct {
	config.EVMConfig
	Overrides     EVMConfigOverrides
	GeneralConfig *TestGeneralConfig
	// contains filtered or unexported fields
}

TestEVMConfig defaults to whatever config.NewEVMConfig() gives but allows overriding certain methods

func NewTestEVMConfig

func NewTestEVMConfig(t testing.TB, generalcfg *TestGeneralConfig) *TestEVMConfig

func (*TestEVMConfig) BalanceMonitorEnabled

func (c *TestEVMConfig) BalanceMonitorEnabled() bool

func (*TestEVMConfig) BlockHistoryEstimatorBlockDelay

func (c *TestEVMConfig) BlockHistoryEstimatorBlockDelay() uint16

func (*TestEVMConfig) BlockHistoryEstimatorBlockHistorySize

func (c *TestEVMConfig) BlockHistoryEstimatorBlockHistorySize() uint16

func (*TestEVMConfig) EthHeadTrackerSamplingInterval

func (c *TestEVMConfig) EthHeadTrackerSamplingInterval() time.Duration

func (*TestEVMConfig) EthTxReaperThreshold

func (c *TestEVMConfig) EthTxReaperThreshold() time.Duration

func (*TestEVMConfig) EthTxResendAfterThreshold

func (c *TestEVMConfig) EthTxResendAfterThreshold() time.Duration

func (*TestEVMConfig) EvmFinalityDepth

func (c *TestEVMConfig) EvmFinalityDepth() uint

func (*TestEVMConfig) EvmGasBumpPercent

func (c *TestEVMConfig) EvmGasBumpPercent() uint16

func (*TestEVMConfig) EvmGasBumpThreshold

func (c *TestEVMConfig) EvmGasBumpThreshold() uint64

func (*TestEVMConfig) EvmGasBumpTxDepth

func (c *TestEVMConfig) EvmGasBumpTxDepth() uint16

func (*TestEVMConfig) EvmGasBumpWei

func (c *TestEVMConfig) EvmGasBumpWei() *big.Int

func (*TestEVMConfig) EvmGasLimitDefault

func (c *TestEVMConfig) EvmGasLimitDefault() uint64

func (*TestEVMConfig) EvmGasLimitMultiplier

func (c *TestEVMConfig) EvmGasLimitMultiplier() float32

func (*TestEVMConfig) EvmGasPriceDefault

func (c *TestEVMConfig) EvmGasPriceDefault() *big.Int

func (*TestEVMConfig) EvmHeadTrackerHistoryDepth

func (c *TestEVMConfig) EvmHeadTrackerHistoryDepth() uint

func (*TestEVMConfig) EvmHeadTrackerMaxBufferSize

func (c *TestEVMConfig) EvmHeadTrackerMaxBufferSize() uint

func (*TestEVMConfig) EvmHeadTrackerSamplingInterval

func (c *TestEVMConfig) EvmHeadTrackerSamplingInterval() time.Duration

func (*TestEVMConfig) EvmLogBackfillBatchSize

func (c *TestEVMConfig) EvmLogBackfillBatchSize() uint32

func (*TestEVMConfig) EvmMaxGasPriceWei

func (c *TestEVMConfig) EvmMaxGasPriceWei() *big.Int

func (*TestEVMConfig) EvmNonceAutoSync

func (c *TestEVMConfig) EvmNonceAutoSync() bool

func (*TestEVMConfig) EvmRPCDefaultBatchSize

func (c *TestEVMConfig) EvmRPCDefaultBatchSize() uint32

func (*TestEVMConfig) FlagsContractAddress

func (c *TestEVMConfig) FlagsContractAddress() string

func (*TestEVMConfig) GasEstimatorMode

func (c *TestEVMConfig) GasEstimatorMode() string

func (*TestEVMConfig) MinIncomingConfirmations

func (c *TestEVMConfig) MinIncomingConfirmations() uint32

func (*TestEVMConfig) MinRequiredOutgoingConfirmations

func (c *TestEVMConfig) MinRequiredOutgoingConfirmations() uint64

func (*TestEVMConfig) MinimumContractPayment

func (c *TestEVMConfig) MinimumContractPayment() *assets.Link

func (*TestEVMConfig) SetEvmGasPriceDefault

func (c *TestEVMConfig) SetEvmGasPriceDefault(p *big.Int) error

type TestGeneralConfig

type TestGeneralConfig struct {
	config.GeneralConfig

	Overrides GeneralConfigOverrides
	// contains filtered or unexported fields
}

TestGeneralConfig defaults to whatever config.NewGeneralConfig() gives but allows overriding certain methods

func NewTestGeneralConfig

func NewTestGeneralConfig(t *testing.T) *TestGeneralConfig

func NewTestGeneralConfigWithOverrides

func NewTestGeneralConfigWithOverrides(t testing.TB, overrides GeneralConfigOverrides) *TestGeneralConfig

func (*TestGeneralConfig) AdminCredentialsFile

func (c *TestGeneralConfig) AdminCredentialsFile() string

func (*TestGeneralConfig) AllowOrigins

func (c *TestGeneralConfig) AllowOrigins() string

func (*TestGeneralConfig) BlockBackfillDepth

func (c *TestGeneralConfig) BlockBackfillDepth() uint64

func (*TestGeneralConfig) BlockBackfillSkip

func (c *TestGeneralConfig) BlockBackfillSkip() bool

func (*TestGeneralConfig) BridgeResponseURL

func (c *TestGeneralConfig) BridgeResponseURL() *url.URL

func (*TestGeneralConfig) Chain

func (c *TestGeneralConfig) Chain() *chains.Chain

func (*TestGeneralConfig) ChainID

func (c *TestGeneralConfig) ChainID() *big.Int

func (*TestGeneralConfig) ClientNodeURL

func (c *TestGeneralConfig) ClientNodeURL() string

func (*TestGeneralConfig) CreateProductionLogger

func (c *TestGeneralConfig) CreateProductionLogger() *logger.Logger

CreateProductionLogger returns a custom logger for the config's root directory and LogLevel, with pretty printing for stdout. If LOG_TO_DISK is false, the logger will only log to stdout.

func (*TestGeneralConfig) DatabaseTimeout

func (c *TestGeneralConfig) DatabaseTimeout() models.Duration

func (*TestGeneralConfig) DatabaseURL

func (c *TestGeneralConfig) DatabaseURL() url.URL

func (*TestGeneralConfig) DefaultHTTPAllowUnrestrictedNetworkAccess

func (c *TestGeneralConfig) DefaultHTTPAllowUnrestrictedNetworkAccess() bool

func (*TestGeneralConfig) DefaultHTTPTimeout

func (c *TestGeneralConfig) DefaultHTTPTimeout() models.Duration

func (*TestGeneralConfig) DefaultMaxHTTPAttempts

func (c *TestGeneralConfig) DefaultMaxHTTPAttempts() uint

func (*TestGeneralConfig) Dev

func (c *TestGeneralConfig) Dev() bool

func (*TestGeneralConfig) EthereumDisabled

func (c *TestGeneralConfig) EthereumDisabled() bool

func (*TestGeneralConfig) FeatureExternalInitiators

func (c *TestGeneralConfig) FeatureExternalInitiators() bool

func (*TestGeneralConfig) GetAdvisoryLockIDConfiguredOrDefault

func (c *TestGeneralConfig) GetAdvisoryLockIDConfiguredOrDefault() int64

func (*TestGeneralConfig) GetDatabaseDialectConfiguredOrDefault

func (c *TestGeneralConfig) GetDatabaseDialectConfiguredOrDefault() dialects.DialectName

func (*TestGeneralConfig) GlobalLockRetryInterval

func (c *TestGeneralConfig) GlobalLockRetryInterval() models.Duration

func (*TestGeneralConfig) InsecureFastScrypt

func (c *TestGeneralConfig) InsecureFastScrypt() bool

func (*TestGeneralConfig) KeeperMaximumGracePeriod

func (c *TestGeneralConfig) KeeperMaximumGracePeriod() int64

func (*TestGeneralConfig) KeeperMinimumRequiredConfirmations

func (c *TestGeneralConfig) KeeperMinimumRequiredConfirmations() uint64

func (*TestGeneralConfig) KeeperRegistrySyncInterval

func (c *TestGeneralConfig) KeeperRegistrySyncInterval() time.Duration

func (*TestGeneralConfig) LogLevel

func (c *TestGeneralConfig) LogLevel() config.LogLevel

func (*TestGeneralConfig) LogSQLMigrations

func (c *TestGeneralConfig) LogSQLMigrations() bool

func (*TestGeneralConfig) LogSQLStatements

func (c *TestGeneralConfig) LogSQLStatements() bool

func (*TestGeneralConfig) LogToDisk

func (c *TestGeneralConfig) LogToDisk() bool

func (*TestGeneralConfig) MigrateDatabase

func (c *TestGeneralConfig) MigrateDatabase() bool

func (*TestGeneralConfig) OCRBootstrapCheckInterval

func (c *TestGeneralConfig) OCRBootstrapCheckInterval() time.Duration

func (*TestGeneralConfig) OCRKeyBundleID

func (c *TestGeneralConfig) OCRKeyBundleID() (string, error)

func (*TestGeneralConfig) OCRObservationGracePeriod

func (c *TestGeneralConfig) OCRObservationGracePeriod() time.Duration

func (*TestGeneralConfig) OCRObservationTimeout

func (c *TestGeneralConfig) OCRObservationTimeout() time.Duration

func (*TestGeneralConfig) OCRTransmitterAddress

func (c *TestGeneralConfig) OCRTransmitterAddress() (ethkey.EIP55Address, error)

func (*TestGeneralConfig) ORMMaxIdleConns

func (c *TestGeneralConfig) ORMMaxIdleConns() int

func (*TestGeneralConfig) ORMMaxOpenConns

func (c *TestGeneralConfig) ORMMaxOpenConns() int

func (*TestGeneralConfig) P2PBootstrapPeers

func (c *TestGeneralConfig) P2PBootstrapPeers() ([]string, error)

func (*TestGeneralConfig) P2PListenPort

func (c *TestGeneralConfig) P2PListenPort() uint16

func (*TestGeneralConfig) P2PPeerID

func (c *TestGeneralConfig) P2PPeerID() p2pkey.PeerID

func (*TestGeneralConfig) RootDir

func (c *TestGeneralConfig) RootDir() string

func (*TestGeneralConfig) SessionSecret

func (c *TestGeneralConfig) SessionSecret() ([]byte, error)

func (*TestGeneralConfig) SessionTimeout

func (c *TestGeneralConfig) SessionTimeout() models.Duration

func (*TestGeneralConfig) TriggerFallbackDBPollInterval

func (c *TestGeneralConfig) TriggerFallbackDBPollInterval() time.Duration

Jump to

Keyboard shortcuts

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