pulsartestutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

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

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) Go

func (impl *CustomRPCWrapperMock) Go(serviceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call

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

type MockListener struct {
	mock.Mock
}

MockListener mocks net.Listener interface

func (*MockListener) Accept

func (mock *MockListener) Accept() (net.Conn, error)

func (*MockListener) Addr

func (mock *MockListener) Addr() net.Addr

func (*MockListener) Close

func (mock *MockListener) Close() error

type MockPulsarStorage

type MockPulsarStorage struct {
	mock.Mock
}

MockPulsarStorage mocks PulsarStorage interface

func (*MockPulsarStorage) Close

func (*MockPulsarStorage) Close() error

func (*MockPulsarStorage) GetLastPulse

func (mock *MockPulsarStorage) GetLastPulse() (*core.Pulse, error)

func (*MockPulsarStorage) SavePulse

func (*MockPulsarStorage) SavePulse(pulse *core.Pulse) error

func (*MockPulsarStorage) SetLastPulse

func (*MockPulsarStorage) SetLastPulse(pulse *core.Pulse) error

type MockRPCClientWrapper

type MockRPCClientWrapper struct {
	mock.Mock
}

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) Go

func (mock *MockRPCClientWrapper) Go(serviceMethod string, args interface{}, reply interface{}, done chan *rpc.Call) *rpc.Call

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()

Jump to

Keyboard shortcuts

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