e2e

package
v1.7.17 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: BSD-3-Clause Imports: 7 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

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 DescribePChain

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

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

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

func GetEnableWhitelistTxTests() (b bool)

func GetRunnerClient

func GetRunnerClient() (cli runner_sdk.Client)

func GetRunnerGRPCEndpoint

func GetRunnerGRPCEndpoint() (ep string)

func GetTestKeys

func GetTestKeys() []*crypto.PrivateKeySECP256K1R

func GetURIs

func GetURIs() []string

func SetEnableWhitelistTxTests

func SetEnableWhitelistTxTests(b bool)

func SetRunnerClient

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

func SetTestKeys

func SetTestKeys(ks []*crypto.PrivateKeySECP256K1R)

func SetURIs

func SetURIs(us []string)

Types

This section is empty.

Directories

Path Synopsis
Implements tests for the blueberry network upgrade.
Implements tests for the blueberry network upgrade.
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 X-chain transfer tests.
Implements X-chain transfer tests.

Jump to

Keyboard shortcuts

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