integration

package
v0.0.0-...-953790c Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNoRemoteURL is returned when network id has no associated url.
	ErrNoRemoteURL = errors.New("network id requires a remote URL")

	// TestConfig defines the default config usable at package-level.
	TestConfig *common.TestConfig

	// RootDir is the main application directory
	RootDir string

	// TestDataDir is data directory used for tests
	TestDataDir string

	// TestNetworkNames network ID to name mapping
	TestNetworkNames = map[int]string{
		params.MainNetworkID:        "Mainnet",
		params.RopstenNetworkID:     "Ropsten",
		params.RinkebyNetworkID:     "Rinkeby",
		params.StatusChainNetworkID: "StatusChain",
	}
)

Functions

func EnsureNodeSync

func EnsureNodeSync(nodeManager common.NodeManager)

EnsureNodeSync waits until node synchronzation is done to continue with tests afterwards. Panics in case of an error or a timeout.

func GetAccount1PKFile

func GetAccount1PKFile() string

GetAccount1PKFile returns the filename for Account1 keystore based on the current network. This allows running the e2e tests on the private network w/o access to the ACCOUNT_PASSWORD env variable

func GetAccount2PKFile

func GetAccount2PKFile() string

GetAccount2PKFile returns the filename for Account2 keystore based on the current network. This allows running the e2e tests on the private network w/o access to the ACCOUNT_PASSWORD env variable

func GetHeadHash

func GetHeadHash() string

GetHeadHash returns the hash associated with a given network id.

func GetHeadHashFromNetworkID

func GetHeadHashFromNetworkID(id int) string

GetHeadHashFromNetworkID returns the hash associated with a given network id.

func GetNetworkID

func GetNetworkID() int

GetNetworkID returns appropriate network id for test based on default or provided -network flag.

func GetRemoteURL

func GetRemoteURL() (string, error)

GetRemoteURL returns the url associated with a given network id.

func GetRemoteURLFromNetworkID

func GetRemoteURLFromNetworkID(id int) (url string, err error)

GetRemoteURLFromNetworkID returns associated network url for giving network id.

func LoadFromFile

func LoadFromFile(filename string) string

LoadFromFile is useful for loading test data, from testdata/filename into a variable nolint: errcheck

Types

This section is empty.

Jump to

Keyboard shortcuts

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