Help us shape the future of Go! Take the 2026 Go Developer Survey

e2e

package
v1.16.16 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2025 License: BSD-3-Clause Imports: 15 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

This section is empty.

Functions

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 for ginkgo-based tests

Types

type APITestEnvironment added in v1.16.16

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

APITestEnvironment represents the test environment for API tests

var APIEnv *APITestEnvironment

APIEnv is the global test environment for API tests

func GetAPIEnv added in v1.16.16

func GetAPIEnv(tc tests.TestContext) *APITestEnvironment

GetAPIEnv returns the test environment for API tests

func (*APITestEnvironment) GetNetwork added in v1.16.16

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

GetNetwork returns the test network

func (*APITestEnvironment) GetRandomNodeURI added in v1.16.16

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

GetRandomNodeURI returns a random node URI from the network

func (*APITestEnvironment) NewKeychain added in v1.16.16

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

NewKeychain creates a new keychain for testing

type APITestFunction added in v1.11.14

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

Additional test requirements: node URIs, network configuration, test timeouts

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 NewGinkgoTestContext added in v1.16.16

func NewGinkgoTestContext() *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() log.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.

Jump to

Keyboard shortcuts

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