e2e

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const CannedBlocksFileMinHeight = 500
View Source
const LOCAL_NETWORK_SIZE = 4

LOCAL_NETWORK_SIZE must remain identical to number of configured nodes in docker/test/benchmark-config Also Lean Helix consensus algo requires it to be >= 4 or it will panic

View Source
const METRICS_NODE_INDEX = 2
View Source
const START_GOSSIP_PORT = 8190
View Source
const START_HTTP_PORT = 8090

Variables

View Source
var OwnerOfAllSupply = keys.Ed25519KeyPairForTests(5) // needs to be a constant across all e2e tests since we deploy the contract only once

Functions

func CopyFile added in v0.7.11

func CopyFile(sourcePath string, targetPath string) error

func GetNodesDataDirs added in v0.7.11

func GetNodesDataDirs(virtualChainId primitives.VirtualChainId) ([]string, error)

func NewInProcessE2EAppNetwork added in v1.2.1

func NewInProcessE2EAppNetwork(virtualChainId primitives.VirtualChainId, randomer *loggerRandomer, experimentalExternalProcessorPluginPath string) *inProcessE2ENetwork

func NewLoggerRandomer added in v1.3.0

func NewLoggerRandomer() *loggerRandomer

func PrintTestTime added in v1.3.0

func PrintTestTime(t *testing.T, msg string, last *time.Time)

Types

type E2EConfig

type E2EConfig struct {
	AppVcid           primitives.VirtualChainId
	RemoteEnvironment bool
	Bootstrap         bool
	AppChainUrl       string
	StressTest        StressTestConfig
	EthereumEndpoint  string
}

func GetConfig added in v1.3.0

func GetConfig() E2EConfig

type Harness added in v1.3.0

type Harness struct {
	// contains filtered or unexported fields
}

func NewAppHarness added in v1.3.0

func NewAppHarness() *Harness

func (*Harness) DeployContract added in v1.3.0

func (h *Harness) DeployContract(from *keys.Ed25519KeyPair, contractName string, processorType orbsClient.ProcessorType, code ...[]byte) (*codec.TransactionResponse, error)

func (*Harness) DeployContractAndRequireSuccess added in v1.3.0

func (h *Harness) DeployContractAndRequireSuccess(t *testing.T, keyPair *keys.Ed25519KeyPair, contractName string, contractBytes ...[]byte) uint64

func (*Harness) DeployNativeContract added in v1.3.0

func (h *Harness) DeployNativeContract(from *keys.Ed25519KeyPair, contractName string, code ...[]byte) (*codec.TransactionResponse, error)

func (*Harness) GetMetrics added in v1.3.3

func (h *Harness) GetMetrics() metrics

func (*Harness) GetTransactionReceiptProof added in v1.3.0

func (h *Harness) GetTransactionReceiptProof(txId string) (response *codec.GetTransactionReceiptProofResponse, err error)

func (*Harness) GetTransactionStatus added in v1.3.0

func (h *Harness) GetTransactionStatus(txId string) (*codec.TransactionResponse, error)

func (*Harness) RunQuery added in v1.3.0

func (h *Harness) RunQuery(senderPublicKey []byte, contractName string, methodName string, args ...interface{}) (response *codec.RunQueryResponse, err error)

func (*Harness) SendDeployTransaction added in v1.3.0

func (h *Harness) SendDeployTransaction(senderPublicKey []byte, senderPrivateKey []byte, contractName string, processorType orbsClient.ProcessorType, code ...[]byte) (*codec.TransactionResponse, string, error)

func (*Harness) SendTransaction added in v1.3.0

func (h *Harness) SendTransaction(senderPublicKey []byte, senderPrivateKey []byte, contractName string, methodName string, args ...interface{}) (*codec.TransactionResponse, string, error)

func (*Harness) WaitUntilReachBlockHeight added in v1.3.15

func (h *Harness) WaitUntilReachBlockHeight(t *testing.T, targetBlockHeight primitives.BlockHeight, waitingTime time.Duration)

func (*Harness) WaitUntilTransactionPoolIsReady added in v1.3.0

func (h *Harness) WaitUntilTransactionPoolIsReady(t *testing.T)

type StressTestConfig

type StressTestConfig struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
_data
contracts

Jump to

Keyboard shortcuts

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