e2e

package
v1.13.5-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Label for filtering a test that is not primarily a C-Chain test
	// but nonentheless uses the C-Chain. Intended to support
	// execution of all C-Chain tests by the coreth repo in an e2e job.
	UsesCChainLabel = "uses-c"
)

Variables

View Source
var EmitMetricsLink bool

Whether a spec-scoped metrics link should be emitted after the current spec finishes executing.

Functions

func CheckBootstrapIsPossible

func CheckBootstrapIsPossible(tc tests.TestContext, network *tmpnet.Network) error

CheckBootstrapIsPossible verifies that bootstrap is possible for the network

func DescribeCChain

func DescribeCChain(text string, args ...interface{}) bool

DescribeCChain annotates the tests for C-Chain.

func DescribePChain

func DescribePChain(text string, args ...interface{}) bool

DescribePChain annotates the tests for P-Chain.

func DescribeXChain

func DescribeXChain(text string, args ...interface{}) bool

DescribeXChain annotates the tests for X-Chain.

func DescribeXChainSerial

func DescribeXChainSerial(text string, args ...interface{}) bool

DescribeXChainSerial annotates serial tests for X-Chain.

func ExecuteAPITest added in v1.11.14

func ExecuteAPITest(apiTest APITestFunction)

ExecuteAPITest executes a test whose primary dependency is being able to access the API of one or more luxd nodes.

func NewTestContext

func NewTestContext() tests.TestContext

NewTestContext creates a new test context

func NewWallet

func NewWallet(tc tests.TestContext, keychain *secp256k1fx.Keychain, uri tmpnet.NodeURI) *primary.Wallet

NewWallet creates a new wallet for testing

Types

type APITestFunction added in v1.11.14

type APITestFunction func(tc tests.TestContext, wallet primary.Wallet, ownerAddress ids.ShortID)

TODO(marun) What else does a test need? e.g. node URIs?

type FlagVars

type FlagVars struct {
	// contains filtered or unexported fields
}

func RegisterFlags

func RegisterFlags() *FlagVars

func (*FlagVars) LuxNodeExecPath added in v1.1.11

func (v *FlagVars) LuxNodeExecPath() string

func (*FlagVars) NetworkDir

func (v *FlagVars) NetworkDir() string

func (*FlagVars) NetworkShutdownDelay

func (v *FlagVars) NetworkShutdownDelay() time.Duration

func (*FlagVars) NodeCount

func (v *FlagVars) NodeCount() int

func (*FlagVars) PluginDir added in v1.1.11

func (v *FlagVars) PluginDir() string

func (*FlagVars) ReuseNetwork added in v1.1.11

func (v *FlagVars) ReuseNetwork() bool

func (*FlagVars) StopNetwork added in v1.1.11

func (v *FlagVars) StopNetwork() bool

type GinkgoTestContext

type GinkgoTestContext struct {
	// contains filtered or unexported fields
}

func NewEventHandlerTestContext

func NewEventHandlerTestContext() *GinkgoTestContext

NewEventHandlerTestContext provides a logger with full output to account for the limited context otherwise provided in an event handler e.g. SynchronizedBeforeSuite.

func NewTestContext

func NewTestContext() *GinkgoTestContext

NewTestContext provides a logger with limited output to account for the context already provided by ginkgo for test logging.

func (*GinkgoTestContext) By

func (*GinkgoTestContext) By(text string, callback ...func())

func (*GinkgoTestContext) Cleanup

func (*GinkgoTestContext) Cleanup()

func (*GinkgoTestContext) ContextWithTimeout

func (tc *GinkgoTestContext) ContextWithTimeout(duration time.Duration) context.Context

Helper simplifying use of a timed context by canceling the context on ginkgo teardown.

func (*GinkgoTestContext) DefaultContext

func (tc *GinkgoTestContext) DefaultContext() context.Context

Helper simplifying use of a timed context configured with the default timeout.

func (*GinkgoTestContext) DeferCleanup

func (*GinkgoTestContext) DeferCleanup(cleanup func())

func (*GinkgoTestContext) Errorf

func (*GinkgoTestContext) Errorf(format string, args ...interface{})

func (*GinkgoTestContext) Eventually

func (*GinkgoTestContext) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msg string)

Re-implementation of testify/require.Eventually that is compatible with ginkgo. testify's version calls the condition function with a goroutine and ginkgo assertions don't work properly in goroutines.

func (*GinkgoTestContext) FailNow

func (*GinkgoTestContext) FailNow()

func (*GinkgoTestContext) GetDefaultContextParent added in v1.11.14

func (*GinkgoTestContext) GetDefaultContextParent() context.Context

func (*GinkgoTestContext) Log

func (tc *GinkgoTestContext) Log() logging.Logger

func (*GinkgoTestContext) WithDefaultContext

func (tc *GinkgoTestContext) WithDefaultContext() common.Option

Helper simplifying use via an option of a timed context configured with the default timeout.

type TestEnvironment

type TestEnvironment struct {
	Network  *tmpnet.Network
	Nodes    []*tmpnet.Node
	Keychain *secp256k1fx.Keychain
}

TestEnvironment represents the test environment

var Env *TestEnvironment

Env is the global test environment

func GetEnv

func GetEnv(tc tests.TestContext) *TestEnvironment

GetEnv returns the test environment

func (*TestEnvironment) GetNetwork

func (e *TestEnvironment) GetNetwork() *tmpnet.Network

GetNetwork returns the test network

func (*TestEnvironment) GetRandomNodeURI

func (e *TestEnvironment) GetRandomNodeURI() tmpnet.NodeURI

GetRandomNodeURI returns a random node URI from the network

func (*TestEnvironment) NewKeychain

func (e *TestEnvironment) NewKeychain() *secp256k1fx.Keychain

NewKeychain creates a new keychain for testing

Jump to

Keyboard shortcuts

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