Documentation ¶
Overview ¶
e2e implements the e2e tests.
Index ¶
- Constants
- func DescribePChain(text string, body func()) bool
- func DescribeXChain(text string, body func()) bool
- func DescribeXChainSerial(text string, body func()) bool
- func InitTestEnvironment(envBytes []byte)
- type TestEnvironment
- func (te *TestEnvironment) AllocateFundedKey() *secp256k1.PrivateKey
- func (te *TestEnvironment) AllocateFundedKeys(count int) []*secp256k1.PrivateKey
- func (te *TestEnvironment) GetNetwork() testnet.Network
- func (te *TestEnvironment) GetRandomNodeURI() string
- func (te *TestEnvironment) NewKeychain(count int) *secp256k1fx.Keychain
- func (te *TestEnvironment) NewWallet(keychain *secp256k1fx.Keychain) primary.Wallet
Constants ¶
const ( // Enough for primary.NewWallet to fetch initial UTXOs. DefaultWalletCreationTimeout = 5 * time.Second // Defines default tx confirmation timeout. // Enough for test/custom networks. DefaultConfirmTxTimeout = 20 * time.Second // A long default timeout used to timeout failed operations but // unlikely to induce flaking due to unexpected resource // contention. DefaultTimeout = 2 * time.Minute // Interval appropriate for network operations that should be // retried periodically but not too often. DefaultPollingInterval = 500 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func DescribePChain ¶ added in v1.7.17
DescribePChain annotates the tests for P-Chain. Can run with any type of cluster (e.g., local, fuji, mainnet).
func DescribeXChain ¶
DescribeXChain annotates the tests for X-Chain. Can run with any type of cluster (e.g., local, fuji, mainnet).
func DescribeXChainSerial ¶ added in v1.10.9
DescribeXChainSerial annotates serial tests for X-Chain. Can run with any type of cluster (e.g., local, fuji, mainnet).
func InitTestEnvironment ¶ added in v1.10.9
func InitTestEnvironment(envBytes []byte)
Types ¶
type TestEnvironment ¶ added in v1.9.9
type TestEnvironment struct { // The directory where the test network configuration is stored NetworkDir string // URIs used to access the API endpoints of nodes of the network URIs []string // The URI used to access the http server that allocates test data TestDataServerURI string // contains filtered or unexported fields }
var Env *TestEnvironment
Env is used to access shared test fixture. Intended to be initialized by SynchronizedBeforeSuite.
func (*TestEnvironment) AllocateFundedKey ¶ added in v1.10.9
func (te *TestEnvironment) AllocateFundedKey() *secp256k1.PrivateKey
Retrieve a funded key allocated for the caller's exclusive use.
func (*TestEnvironment) AllocateFundedKeys ¶ added in v1.10.9
func (te *TestEnvironment) AllocateFundedKeys(count int) []*secp256k1.PrivateKey
Retrieve the specified number of funded keys allocated for the caller's exclusive use.
func (*TestEnvironment) GetNetwork ¶ added in v1.10.9
func (te *TestEnvironment) GetNetwork() testnet.Network
Retrieve the network to target for testing.
func (*TestEnvironment) GetRandomNodeURI ¶ added in v1.10.9
func (te *TestEnvironment) GetRandomNodeURI() string
Retrieve a random URI to naively attempt to spread API load across nodes.
func (*TestEnvironment) NewKeychain ¶ added in v1.10.9
func (te *TestEnvironment) NewKeychain(count int) *secp256k1fx.Keychain
Create a new keychain with the specified number of test keys.
func (*TestEnvironment) NewWallet ¶ added in v1.10.9
func (te *TestEnvironment) NewWallet(keychain *secp256k1fx.Keychain) primary.Wallet
Create a new wallet for the provided keychain.
Directories ¶
Path | Synopsis |
---|---|
Implements tests for the banff network upgrade.
|
Implements tests for the banff network upgrade. |
Implements static handlers tests for avm and platformvm
|
Implements static handlers tests for avm and platformvm |
x
|
|
transfer
Implements X-chain transfer tests.
|
Implements X-chain transfer tests. |