e2e

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseSetup

type BaseSetup struct {
	WorkingDir string
	RootKey    string
	// contains filtered or unexported fields
}

BaseSetup implements mechanism, to setup base env for e2e tests.

func Setup

func Setup(t *testing.T) *BaseSetup

Setup sets up environment for e2e tests

func (*BaseSetup) ListAccounts

func (setup *BaseSetup) ListAccounts(t *testing.T, network core.Network) ([]byte, int)

ListAccounts lists accounts.

func (*BaseSetup) ReadConfig

func (setup *BaseSetup) ReadConfig(t *testing.T, network core.Network) ([]byte, int)

ReadConfig reads config.

func (*BaseSetup) ReadSlashingStorage

func (setup *BaseSetup) ReadSlashingStorage(t *testing.T, network core.Network) ([]byte, int)

ReadSlashingStorage reads slashing storage.

func (*BaseSetup) Sign

func (setup *BaseSetup) Sign(endpoint string, data map[string]interface{}, network core.Network) ([]byte, error)

Sign tests the sign endpoint.

func (*BaseSetup) UpdateConfig added in v1.5.0

func (setup *BaseSetup) UpdateConfig(t *testing.T, network core.Network, data backend.Config) ([]byte, int)

UpdateConfig updates config.

func (*BaseSetup) UpdateStorage

func (setup *BaseSetup) UpdateStorage(t *testing.T, network core.Network, minimalSlashingData bool, walletType core.WalletType, privKey []byte) *inmemory.InMemStore

UpdateStorage updates the storage.

type ServiceError

type ServiceError struct {
	Data map[string]interface{}
}

ServiceError represents service error type.

func NewServiceError

func NewServiceError(data map[string]interface{}) *ServiceError

NewServiceError is the constructor of ServiceError.

func (*ServiceError) DataValue

func (e *ServiceError) DataValue(field string) interface{}

DataValue returns "field" value from data

func (*ServiceError) Error

func (e *ServiceError) Error() string

Error implements error interface.

func (*ServiceError) ErrorValue

func (e *ServiceError) ErrorValue() string

ErrorValue returns error value from the data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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