Documentation ¶
Index ¶
- type BaseSetup
- func (setup *BaseSetup) ListAccounts(t *testing.T, network core.Network) ([]byte, int)
- func (setup *BaseSetup) ReadConfig(t *testing.T, network core.Network) ([]byte, int)
- func (setup *BaseSetup) ReadSlashingStorage(t *testing.T, network core.Network) ([]byte, int)
- func (setup *BaseSetup) Sign(endpoint string, data map[string]interface{}, network core.Network) ([]byte, error)
- func (setup *BaseSetup) UpdateConfig(t *testing.T, network core.Network, data backend.Config) ([]byte, int)
- func (setup *BaseSetup) UpdateStorage(t *testing.T, network core.Network, minimalSlashingData bool, ...) *inmemory.InMemStore
- type ServiceError
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 (*BaseSetup) ListAccounts ¶
ListAccounts lists accounts.
func (*BaseSetup) ReadConfig ¶
ReadConfig reads config.
func (*BaseSetup) ReadSlashingStorage ¶
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
Click to show internal directories.
Click to hide internal directories.