e2e

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

E2E tests

The implemented E2E tests start a local instance of dogechain.

As such, they require the binary 'dogechain' to be available in the $PATH variable.
Typically, the actual directory added to the $PATH variable would be the go/bin folder.

Step 1: Build the dogechain

go build -o $HOME/go/bin/dogechain ./main.go

Step 2: Run the tests

Now that the dogechain binary is in the go/bin folder, the e2e test server is able to locate it when running tests.

Manual checks if things are acting funny

Check if the dogechain process is running

If you've stopped the tests abruptly, chances are the dogechain process is still running on your machine. <br/ > In order for the tests to function normally, please kill the process.

Check if the dogechain-* folders are present in /tmp/

While running, the e2e server stores data needed for running in the /tmp/dogechain* folders.
To clean up these folders, simply run:

cd /tmp/
rm -rf dogechain-*
Clean the golang test cache

Golang caches test results, and may not even run a test, causing tests to fail on some machines and work on others.

go clean -testcache

This command cleans the test cache, and should be added to the runtime config.

Another way to disable test caching altogether is to add the following flag when running go test -count=1:

go test ./... -count=1

Note

constants

Constant values that used in some e2e tests are defined in e2e/const.go. Mock contract are pre-compiled and the result is stored in const.go in order to avoid dependencies of solc command (solidity compiler).

You can get the byte code from original program by following command.

$ solc --bin e2e/sample.sol

Currently you need to build with version 0.5.x compiler. You can check the compiler version by solc --version.

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.5.17+commit.d19bba13.Darwin.appleclang

Documentation

Index

Constants

View Source
const (
	IBFTDirPrefix = "e2e-ibft-"
	IBFTMinNodes  = 4
)

Default settings for IBFT nodes

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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