Documentation ¶
Overview ¶
Package pulsartestutil - test utils for pulsar package
Package pulsartestutil - test utils for pulsar package ¶
Package pulsartestutil - test utils for pulsar package ¶
Package pulsartestutil - test utils for pulsar package ¶
Package pulsartestutil - test utils for pulsar package
Index ¶
- Variables
- type CustomRPCWrapperMock
- func (*CustomRPCWrapperMock) Close() error
- func (impl *CustomRPCWrapperMock) CreateConnection(connectionType configuration.ConnectionType, connectionAddress string) error
- func (impl *CustomRPCWrapperMock) Go(serviceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call
- func (impl *CustomRPCWrapperMock) IsInitialised() bool
- func (*CustomRPCWrapperMock) Lock()
- func (impl *CustomRPCWrapperMock) ResetClient()
- func (*CustomRPCWrapperMock) SetRPCClient(client *rpc.Client)
- func (*CustomRPCWrapperMock) Unlock()
- type MockEntropyGenerator
- type MockListener
- type MockPulsarStorage
- type MockRPCClientWrapper
- func (mock *MockRPCClientWrapper) Close() error
- func (mock *MockRPCClientWrapper) CreateConnection(connectionType configuration.ConnectionType, connectionAddress string) error
- func (mock *MockRPCClientWrapper) Go(serviceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call
- func (mock *MockRPCClientWrapper) IsInitialised() bool
- func (mock *MockRPCClientWrapper) Lock()
- func (mock *MockRPCClientWrapper) ResetClient()
- func (mock *MockRPCClientWrapper) SetRPCClient(client *rpc.Client)
- func (mock *MockRPCClientWrapper) Unlock()
Constants ¶
This section is empty.
Variables ¶
View Source
var MockEntropy = [64]byte{1, 2, 3, 4, 5, 6, 7, 8}
MockEntropy for pulsar's tests
Functions ¶
This section is empty.
Types ¶
type CustomRPCWrapperMock ¶
type CustomRPCWrapperMock struct { Done *rpc.Call IsInitFunc func() bool CreateConnectionFunc func() error }
CustomRPCWrapperMock is a mock of RPCClientWrapper interface It uses hand-created mocks
func (*CustomRPCWrapperMock) Close ¶
func (*CustomRPCWrapperMock) Close() error
func (*CustomRPCWrapperMock) CreateConnection ¶
func (impl *CustomRPCWrapperMock) CreateConnection(connectionType configuration.ConnectionType, connectionAddress string) error
func (*CustomRPCWrapperMock) IsInitialised ¶
func (impl *CustomRPCWrapperMock) IsInitialised() bool
func (*CustomRPCWrapperMock) Lock ¶
func (*CustomRPCWrapperMock) Lock()
func (*CustomRPCWrapperMock) ResetClient ¶
func (impl *CustomRPCWrapperMock) ResetClient()
func (*CustomRPCWrapperMock) SetRPCClient ¶
func (*CustomRPCWrapperMock) SetRPCClient(client *rpc.Client)
func (*CustomRPCWrapperMock) Unlock ¶
func (*CustomRPCWrapperMock) Unlock()
type MockEntropyGenerator ¶
type MockEntropyGenerator struct { }
MockEntropyGenerator implements EntropyGenerator and is being used for tests
func (MockEntropyGenerator) GenerateEntropy ¶
func (MockEntropyGenerator) GenerateEntropy() core.Entropy
GenerateEntropy returns mocked entropy
type MockListener ¶
MockListener mocks net.Listener interface
func (*MockListener) Addr ¶
func (mock *MockListener) Addr() net.Addr
func (*MockListener) Close ¶
func (mock *MockListener) Close() error
type MockPulsarStorage ¶
MockPulsarStorage mocks PulsarStorage interface
func (*MockPulsarStorage) Close ¶
func (*MockPulsarStorage) Close() error
func (*MockPulsarStorage) GetLastPulse ¶
func (mock *MockPulsarStorage) GetLastPulse() (*core.Pulse, error)
func (*MockPulsarStorage) SetLastPulse ¶
func (*MockPulsarStorage) SetLastPulse(pulse *core.Pulse) error
type MockRPCClientWrapper ¶
MockRPCClientWrapper is a mock of RPCClientWrapper interface It uses testify.mock
func (*MockRPCClientWrapper) Close ¶
func (mock *MockRPCClientWrapper) Close() error
func (*MockRPCClientWrapper) CreateConnection ¶
func (mock *MockRPCClientWrapper) CreateConnection(connectionType configuration.ConnectionType, connectionAddress string) error
func (*MockRPCClientWrapper) IsInitialised ¶
func (mock *MockRPCClientWrapper) IsInitialised() bool
func (*MockRPCClientWrapper) Lock ¶
func (mock *MockRPCClientWrapper) Lock()
func (*MockRPCClientWrapper) ResetClient ¶
func (mock *MockRPCClientWrapper) ResetClient()
func (*MockRPCClientWrapper) SetRPCClient ¶
func (mock *MockRPCClientWrapper) SetRPCClient(client *rpc.Client)
func (*MockRPCClientWrapper) Unlock ¶
func (mock *MockRPCClientWrapper) Unlock()
Click to show internal directories.
Click to hide internal directories.