e2e

package
v0.1.11 Latest Latest
Warning

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

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

README

Axia 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" \
--axia-path=./build/axia

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.NewAXIAWallet to fetch initial UTXOs.
	DefaultAXIAWalletCreationTimeout = 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 DescribeSwapChain added in v0.1.9

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

DescribeSwapChain annotates the tests for SwapChain. Can run with any type of cluster (e.g., local, test, mainnet).

func GetEnableWhitelistTxTests

func GetEnableWhitelistTxTests() (b bool)

func GetExecPath

func GetExecPath() (p string)

func GetRunnerClient

func GetRunnerClient() (cli runner_client.Client)

func GetRunnerGRPCEndpoint

func GetRunnerGRPCEndpoint() (ep string)

func GetURIs

func GetURIs() []string

func SetEnableWhitelistTxTests

func SetEnableWhitelistTxTests(b bool)

func SetExecPath

func SetExecPath(p string)

func SetRunnerClient

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

func SetURIs

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 SwapChain whitelist vtx (stop vertex) tests.
Implements SwapChain 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