testconfig

package
v0.0.0-...-50c7a33 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Base64OverrideEnvVarName = k8s_config.EnvBase64ConfigOverride
	NoKey                    = "NO_KEY"
)
View Source
const TestTypeEnvVarName = "TEST_TYPE"

Variables

This section is empty.

Functions

func MustCopy

func MustCopy[T any](c T) T

MustCopy Returns a deep copy of struct passed to it and returns a typed copy (or panics on error)

Types

type Common

type Common struct {
	Network   *string `toml:"network"`
	InsideK8s *bool   `toml:"inside_k8"`
	User      *string `toml:"user"`
	// if rpc requires api key to be passed as an HTTP header
	L2RPCApiKey        *string `toml:"l2_rpc_url_api_key"`
	L2RPCUrl           *string `toml:"l2_rpc_url"`
	PrivateKey         *string `toml:"private_key"`
	Account            *string `toml:"account"`
	Stateful           *bool   `toml:"stateful_db"`
	InternalDockerRepo *string `toml:"internal_docker_repo"`
	DevnetImage        *string `toml:"devnet_image"`
}

func (*Common) Validate

func (c *Common) Validate() error

type Product

type Product string
const (
	OCR2 Product = "ocr2"
)

type TestConfig

type TestConfig struct {
	ChainlinkImage        *ctf_config.ChainlinkImageConfig `toml:"ChainlinkImage"`
	Logging               *ctf_config.LoggingConfig        `toml:"Logging"`
	ChainlinkUpgradeImage *ctf_config.ChainlinkImageConfig `toml:"ChainlinkUpgradeImage"`
	Network               *ctf_config.NetworkConfig        `toml:"Network"`
	Common                *Common                          `toml:"Common"`
	OCR2                  *ocr2_config.Config              `toml:"OCR2"`
	ConfigurationName     string                           `toml:"-"`
}

func GetConfig

func GetConfig(configurationName string, product Product) (TestConfig, error)

func (*TestConfig) AsBase64

func (c *TestConfig) AsBase64() (string, error)

func (TestConfig) GetChainlinkImageConfig

func (c TestConfig) GetChainlinkImageConfig() *ctf_config.ChainlinkImageConfig

func (TestConfig) GetChainlinkUpgradeImageConfig

func (c TestConfig) GetChainlinkUpgradeImageConfig() *ctf_config.ChainlinkImageConfig

func (TestConfig) GetCommonConfig

func (c TestConfig) GetCommonConfig() *Common

func (TestConfig) GetConfigurationName

func (c TestConfig) GetConfigurationName() string

func (*TestConfig) GetLoggingConfig

func (c *TestConfig) GetLoggingConfig() *ctf_config.LoggingConfig

func (TestConfig) GetNetworkConfig

func (c TestConfig) GetNetworkConfig() *ctf_config.NetworkConfig

func (*TestConfig) GetPrivateEthereumNetworkConfig

func (c *TestConfig) GetPrivateEthereumNetworkConfig() *test_env.EthereumNetwork

func (*TestConfig) GetPyroscopeConfig

func (c *TestConfig) GetPyroscopeConfig() *ctf_config.PyroscopeConfig

func (TestConfig) MustCopy

func (c TestConfig) MustCopy() any

MustCopy Returns a deep copy of the Test Config or panics on error

func (*TestConfig) Save

func (c *TestConfig) Save() (string, error)

Saves Test Config to a local file

func (*TestConfig) Validate

func (c *TestConfig) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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