Documentation
¶
Overview ¶
Package coretest provides test utilities for consensus engine core
Index ¶
- type MockEngine
- func (m *MockEngine) AssertStartCalled()
- func (m *MockEngine) AssertStopCalled()
- func (m *MockEngine) HealthCheck(ctx context.Context) (interface{}, error)
- func (m *MockEngine) IsBootstrapped() bool
- func (m *MockEngine) LastAccepted() ids.ID
- func (m *MockEngine) SetBootstrapped(bootstrapped bool)
- func (m *MockEngine) SetHealthy(healthy bool)
- func (m *MockEngine) SetLastAccepted(id ids.ID)
- func (m *MockEngine) Start(ctx context.Context, startReqID uint32) error
- func (m *MockEngine) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockEngine ¶
type MockEngine struct {
// contains filtered or unexported fields
}
MockEngine provides a mock implementation for testing
func NewMockEngine ¶
func NewMockEngine(t *testing.T) *MockEngine
NewMockEngine creates a new mock engine for testing
func (*MockEngine) AssertStartCalled ¶
func (m *MockEngine) AssertStartCalled()
AssertStartCalled asserts that Start was called
func (*MockEngine) AssertStopCalled ¶
func (m *MockEngine) AssertStopCalled()
AssertStopCalled asserts that Stop was called
func (*MockEngine) HealthCheck ¶
func (m *MockEngine) HealthCheck(ctx context.Context) (interface{}, error)
HealthCheck returns the health status
func (*MockEngine) IsBootstrapped ¶
func (m *MockEngine) IsBootstrapped() bool
IsBootstrapped returns whether the engine is bootstrapped
func (*MockEngine) LastAccepted ¶
func (m *MockEngine) LastAccepted() ids.ID
LastAccepted returns the last accepted ID
func (*MockEngine) SetBootstrapped ¶
func (m *MockEngine) SetBootstrapped(bootstrapped bool)
SetBootstrapped sets the bootstrapped state
func (*MockEngine) SetHealthy ¶
func (m *MockEngine) SetHealthy(healthy bool)
SetHealthy sets the health status
func (*MockEngine) SetLastAccepted ¶
func (m *MockEngine) SetLastAccepted(id ids.ID)
SetLastAccepted sets the last accepted ID
Click to show internal directories.
Click to hide internal directories.