testdb

package
v2.5.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowRevert

func AllowRevert(sm *mock_chainmanager.MockStateManager)

AllowRevert accepts any number of Revert calls on sm and does nothing.

This mock keeps no undo log, so it could not roll state back even if it wanted to: what the expectation buys is the ability to drive a handler down a failure path that reverts without gomock aborting on an unexpected call. No test may depend on revert semantics through it.

Call it only from tests that assert nothing about Revert. Because gomock matches expectations in declaration order, this one shadows any narrower Revert expectation declared after it.

func NewMockKVStore

func NewMockKVStore(ctrl *gomock.Controller) db.KVStore

NewMockKVStore returns a in memory KVStore.

func NewMockStateManager

func NewMockStateManager(ctrl *gomock.Controller) *mock_chainmanager.MockStateManager

NewMockStateManager returns a in memory StateManager.

func NewMockStateManagerWithoutHeightFunc

func NewMockStateManagerWithoutHeightFunc(ctrl *gomock.Controller) *mock_chainmanager.MockStateManager

NewMockStateManagerWithoutHeightFunc returns a in memory StateManager without default height function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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