e2e

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

README

Avalanche e2e test suites

  • Works for any environments (e.g., local, test network).
  • Compiles to a single binary with customizable configurations.

Running tests

go install -v github.com/onsi/ginkgo/v2/ginkgo@v2.0.0
ACK_GINKGO_RC=true ginkgo build ./tests/e2e
./tests/e2e/e2e.test --help

./tests/e2e/e2e.test \
--network-runner-grpc-endpoint="0.0.0.0:12340" \
--avalanchego-path=./build/avalanchego

See tests.e2e.sh for an example.

Adding tests

Define any flags/configurations in e2e.go.

Create a new package to implement feature-specific tests, or add tests to an existing package. For example:

.
└── e2e
    ├── README.md
    ├── e2e.go
    ├── e2e_test.go
    └── ping
        └── suites.go

e2e.go defines common configurations (e.g., network-runner client) for other test packages. ping/suites.go defines ping tests, annotated by [Ping], which can be selected by ./tests/e2e/e2e.test --ginkgo.focus "\[Local\] \[Ping\]".

Documentation

Overview

e2e implements the e2e tests.

Index

Constants

View Source
const (
	// Enough for primary.NewWallet to fetch initial UTXOs.
	DefaultWalletCreationTimeout = 5 * time.Second

	// Defines default tx confirmation timeout.
	// Enough for test/custom networks.
	DefaultConfirmTxTimeout = 10 * time.Second
)

Variables

This section is empty.

Functions

func CloseRunnerClient added in v1.7.11

func CloseRunnerClient() (err error)

func DescribeLocal

func DescribeLocal(text string, body func()) bool

DescribeLocal annotates the tests that requires local network-runner. Can only run with local cluster.

func DescribeXChain

func DescribeXChain(text string, body func()) bool

DescribeXChain annotates the tests for X-Chain. Can run with any type of cluster (e.g., local, fuji, mainnet).

func GetEnableWhitelistTxTests added in v1.7.11

func GetEnableWhitelistTxTests() (b bool)

func GetExecPath added in v1.7.11

func GetExecPath() (p string)

func GetRunnerClient added in v1.7.11

func GetRunnerClient() (cli runner_client.Client)

func GetRunnerGRPCEndpoint added in v1.7.11

func GetRunnerGRPCEndpoint() (ep string)

func GetURIs added in v1.7.11

func GetURIs() []string

func SetEnableWhitelistTxTests added in v1.7.11

func SetEnableWhitelistTxTests(b bool)

func SetExecPath added in v1.7.11

func SetExecPath(p string)

func SetRunnerClient added in v1.7.11

func SetRunnerClient(logLevel string, gRPCEp string) (cli runner_client.Client, err error)

func SetURIs added in v1.7.11

func SetURIs(us []string)

Types

This section is empty.

Directories

Path Synopsis
Implements ping tests, requires network-runner cluster.
Implements ping tests, requires network-runner cluster.
Implements static handlers tests for avm and platformvm
Implements static handlers tests for avm and platformvm
Implements X-Chain whitelist vtx (stop vertex) tests.
Implements X-Chain whitelist vtx (stop vertex) tests.
x
transfer
Implements transfer tests.
Implements transfer tests.

Jump to

Keyboard shortcuts

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