coretest

package
v1.22.25 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package coretest provides test utilities for consensus engine core

Index

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

func (*MockEngine) Start

func (m *MockEngine) Start(ctx context.Context, startReqID uint32) error

Start starts the mock engine

func (*MockEngine) Stop

func (m *MockEngine) Stop(ctx context.Context) error

Stop stops the mock engine

Jump to

Keyboard shortcuts

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