unittest

package
v0.35.6-crescendo-prev... Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockBlockHeaderStorage

func MockBlockHeaderStorage(opts ...BlockHeaderMockOptions) *storagemock.Headers

func MockProtocolState

func MockProtocolState(opts ...StateMockOptions) *statemock.State

func MockProtocolStateSnapshot

func MockProtocolStateSnapshot(opts ...SnapshotMockOptions) *statemock.Snapshot

func MockResultsStorage

func MockResultsStorage(opts ...ResultsMockOptions) *storagemock.ExecutionResults

func MockSealsStorage added in v0.26.8

func MockSealsStorage(opts ...SealsMockOptions) *storagemock.Seals

func RemoveExpectedCall

func RemoveExpectedCall(method string, expectedCalls []*mock.Call) []*mock.Call

Types

type BlockHeaderMockOptions

type BlockHeaderMockOptions func(*storagemock.Headers)

func WithBlockIDByHeight added in v0.31.0

func WithBlockIDByHeight(blocksByHeight map[uint64]*flow.Block) BlockHeaderMockOptions

func WithByHeight

func WithByHeight(blocksByHeight map[uint64]*flow.Block) BlockHeaderMockOptions

func WithByID

func WithByID(blocksByID map[flow.Identifier]*flow.Block) BlockHeaderMockOptions

type ResultsMockOptions

type ResultsMockOptions func(*storagemock.ExecutionResults)

func WithByBlockID

func WithByBlockID(resultsByID map[flow.Identifier]*flow.ExecutionResult) ResultsMockOptions

func WithResultByID added in v0.26.8

func WithResultByID(resultsByID map[flow.Identifier]*flow.ExecutionResult) ResultsMockOptions

type SealsMockOptions added in v0.26.8

type SealsMockOptions func(*storagemock.Seals)

func WithSealsByBlockID added in v0.26.8

func WithSealsByBlockID(sealsByBlockID map[flow.Identifier]*flow.Seal) SealsMockOptions

type SnapshotMockOptions

type SnapshotMockOptions func(*statemock.Snapshot)

func WithHead

func WithHead(head *flow.Header) SnapshotMockOptions

func WithSeal added in v0.26.8

func WithSeal(seal *flow.Seal) SnapshotMockOptions

type StateMockOptions

type StateMockOptions func(*statemock.State)

func WithSealedSnapshot added in v0.26.8

func WithSealedSnapshot(snapshot *statemock.Snapshot) StateMockOptions

Jump to

Keyboard shortcuts

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