testscommon

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitFetcherStub

type GitFetcherStub struct {
	CloneCalled    func(r, d string) error
	CheckoutCalled func(repoDir string, commitHashOrBranch string) error
}

GitFetcherStub -

func (*GitFetcherStub) Checkout

func (gf *GitFetcherStub) Checkout(repoDir string, commitHashOrBranch string) error

Checkout -

func (*GitFetcherStub) Clone

func (gf *GitFetcherStub) Clone(repo, dir string) error

Clone -

type NodeHandlerStub added in v1.8.0

type NodeHandlerStub struct {
	GetProcessComponentsCalled func() factory.ProcessComponentsHolder
}

NodeHandlerStub -

func (*NodeHandlerStub) Close added in v1.8.0

func (n *NodeHandlerStub) Close() error

Close -

func (*NodeHandlerStub) ForceChangeOfEpoch added in v1.8.0

func (n *NodeHandlerStub) ForceChangeOfEpoch() error

ForceChangeOfEpoch -

func (*NodeHandlerStub) GetBroadcastMessenger added in v1.8.0

func (n *NodeHandlerStub) GetBroadcastMessenger() consensus.BroadcastMessenger

GetBroadcastMessenger -

func (*NodeHandlerStub) GetChainHandler added in v1.8.0

func (n *NodeHandlerStub) GetChainHandler() data.ChainHandler

GetChainHandler -

func (*NodeHandlerStub) GetCoreComponents added in v1.8.0

func (n *NodeHandlerStub) GetCoreComponents() factory.CoreComponentsHolder

GetCoreComponents -

func (*NodeHandlerStub) GetCryptoComponents added in v1.8.0

func (n *NodeHandlerStub) GetCryptoComponents() factory.CryptoComponentsHolder

GetCryptoComponents -

func (*NodeHandlerStub) GetDataComponents added in v1.8.0

func (n *NodeHandlerStub) GetDataComponents() factory.DataComponentsHolder

GetDataComponents -

func (*NodeHandlerStub) GetFacadeHandler added in v1.8.0

func (n *NodeHandlerStub) GetFacadeHandler() shared.FacadeHandler

GetFacadeHandler -

func (*NodeHandlerStub) GetProcessComponents added in v1.8.0

func (n *NodeHandlerStub) GetProcessComponents() factory.ProcessComponentsHolder

GetProcessComponents -

func (*NodeHandlerStub) GetShardCoordinator added in v1.8.0

func (n *NodeHandlerStub) GetShardCoordinator() sharding.Coordinator

GetShardCoordinator -

func (*NodeHandlerStub) GetStateComponents added in v1.8.0

func (n *NodeHandlerStub) GetStateComponents() factory.StateComponentsHolder

GetStateComponents -

func (*NodeHandlerStub) GetStatusCoreComponents added in v1.8.0

func (n *NodeHandlerStub) GetStatusCoreComponents() factory.StatusCoreComponentsHolder

GetStatusCoreComponents -

func (*NodeHandlerStub) IsInterfaceNil added in v1.8.0

func (n *NodeHandlerStub) IsInterfaceNil() bool

IsInterfaceNil -

func (*NodeHandlerStub) RemoveAccount added in v1.8.0

func (n *NodeHandlerStub) RemoveAccount(_ []byte) error

RemoveAccount -

func (*NodeHandlerStub) SetKeyValueForAddress added in v1.8.0

func (n *NodeHandlerStub) SetKeyValueForAddress(_ []byte, _ map[string]string) error

SetKeyValueForAddress -

func (*NodeHandlerStub) SetStateForAddress added in v1.8.0

func (n *NodeHandlerStub) SetStateForAddress(_ []byte, _ *dtos.AddressState) error

SetStateForAddress -

type SimulatorHandlerMock added in v1.7.1

type SimulatorHandlerMock struct {
	GetInitialWalletKeysCalled               func() *dtos.InitialWalletKeys
	GenerateBlocksCalled                     func(numOfBlocks int) error
	SetKeyValueForAddressCalled              func(address string, keyValueMap map[string]string) error
	SetStateMultipleCalled                   func(stateSlice []*dtos.AddressState) error
	AddValidatorKeysCalled                   func(validatorsPrivateKeys [][]byte) error
	GenerateBlocksUntilEpochIsReachedCalled  func(targetEpoch int32) error
	ForceResetValidatorStatisticsCacheCalled func() error
	RemoveAccountsCalled                     func(addresses []string) error
	GetRestAPIInterfacesCalled               func() map[uint32]string
	ForceChangeOfEpochCalled                 func() error
	GetNodeHandlerCalled                     func(shardID uint32) process.NodeHandler
}

SimulatorHandlerMock -

func (*SimulatorHandlerMock) AddValidatorKeys added in v1.7.1

func (mock *SimulatorHandlerMock) AddValidatorKeys(validatorsPrivateKeys [][]byte) error

AddValidatorKeys -

func (*SimulatorHandlerMock) ForceChangeOfEpoch added in v1.7.13

func (mock *SimulatorHandlerMock) ForceChangeOfEpoch() error

ForceChangeOfEpoch -

func (*SimulatorHandlerMock) ForceResetValidatorStatisticsCache added in v1.7.4

func (mock *SimulatorHandlerMock) ForceResetValidatorStatisticsCache() error

ForceResetValidatorStatisticsCache -

func (*SimulatorHandlerMock) GenerateBlocks added in v1.7.1

func (mock *SimulatorHandlerMock) GenerateBlocks(numOfBlocks int) error

GenerateBlocks -

func (*SimulatorHandlerMock) GenerateBlocksUntilEpochIsReached added in v1.7.4

func (mock *SimulatorHandlerMock) GenerateBlocksUntilEpochIsReached(targetEpoch int32) error

GenerateBlocksUntilEpochIsReached -

func (*SimulatorHandlerMock) GetInitialWalletKeys added in v1.7.1

func (mock *SimulatorHandlerMock) GetInitialWalletKeys() *dtos.InitialWalletKeys

GetInitialWalletKeys -

func (*SimulatorHandlerMock) GetNodeHandler added in v1.7.13

func (mock *SimulatorHandlerMock) GetNodeHandler(shardID uint32) process.NodeHandler

GetNodeHandler -

func (*SimulatorHandlerMock) GetRestAPIInterfaces added in v1.7.7

func (mock *SimulatorHandlerMock) GetRestAPIInterfaces() map[uint32]string

GetRestAPIInterfaces -

func (*SimulatorHandlerMock) IsInterfaceNil added in v1.7.1

func (mock *SimulatorHandlerMock) IsInterfaceNil() bool

IsInterfaceNil -

func (*SimulatorHandlerMock) RemoveAccounts added in v1.7.6

func (mock *SimulatorHandlerMock) RemoveAccounts(addresses []string) error

RemoveAccounts -

func (*SimulatorHandlerMock) SetKeyValueForAddress added in v1.7.1

func (mock *SimulatorHandlerMock) SetKeyValueForAddress(address string, keyValueMap map[string]string) error

SetKeyValueForAddress -

func (*SimulatorHandlerMock) SetStateMultiple added in v1.7.1

func (mock *SimulatorHandlerMock) SetStateMultiple(stateSlice []*dtos.AddressState) error

SetStateMultiple -

type TransactionHandlerMock added in v1.7.13

type TransactionHandlerMock struct {
	GetProcessedTransactionStatusCalled func(txHash string) (*data.ProcessStatusResponse, error)
}

TransactionHandlerMock -

func (*TransactionHandlerMock) GetProcessedTransactionStatus added in v1.7.13

func (th *TransactionHandlerMock) GetProcessedTransactionStatus(txHash string) (*data.ProcessStatusResponse, error)

GetProcessedTransactionStatus -

Jump to

Keyboard shortcuts

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