mocks

package
v27.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeStatusCheckerMock

type NodeStatusCheckerMock struct {
	// IsSyncing is the value to return when IsNodeSyncing is called.
	IsSyncing bool
	// IsNodeSyncingError is the error to return when IsNodeSyncing is called.
	IsNodeSyncingError error
	// IsNodeSyncingCalled is a flag indicating if IsNodeSyncing was called.
	IsNodeSyncingCalled bool
}

NodeStatusCheckerMock is a mock implementation of domain.NodeStatusChecker.

func (*NodeStatusCheckerMock) IsNodeSyncing

func (n *NodeStatusCheckerMock) IsNodeSyncing(ctx types.Context) (bool, error)

IsNodeSyncing implements domain.NodeStatusChecker.

type PoolsExtractorMock

type PoolsExtractorMock struct {
	// AllBlockDataError is the error to return when ProcessAllBlockData is called.
	AllBlockDataError error
	// ChangedBlockDataError is the error to return when ProcessChangedBlockData is called.
	ChangedBlockDataError error
	// IsProcessAllBlockDataCalled is a flag indicating if ProcessAllBlockData was called.
	IsProcessAllBlockDataCalled bool
	// IsProcessAllChangedDataCalled is a flag indicating if ProcessChangedBlockData was called.
	IsProcessAllChangedDataCalled bool
	// If this is non-empty, ProcessAllBlockData(...) will panic with this message.
	ProcessAllBlockDataPanicMsg string
	// Block pools to return
	BlockPools commondomain.BlockPools
	// CreatedPoolIDs is the map of created pool IDs to return when ExtractCreated is called.
	CreatedPoolIDs map[uint64]commondomain.PoolCreation
	// CreatedPoolsError is the error to return when ExtractCreated is called.
	CreatedPoolsError error
	// IsProcessCreatedCalled is a flag indicating if ProcessCreated was called.
	IsProcessCreatedCalled bool
}

func (*PoolsExtractorMock) ExtractAll

ExtractAll implements commondomain.PoolExtractor.

func (*PoolsExtractorMock) ExtractChanged

func (p *PoolsExtractorMock) ExtractChanged(ctx types.Context) (commondomain.BlockPools, error)

ExtractChanged implements commondomain.PoolExtractor.

func (*PoolsExtractorMock) ExtractCreated

ExtractCreated implements commondomain.PoolExtractor.

func (*PoolsExtractorMock) ResetPoolTracker

func (p *PoolsExtractorMock) ResetPoolTracker(ctx types.Context)

ResetPoolTracker implements commondomain.PoolExtractor.

Jump to

Keyboard shortcuts

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