testdb

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowRevert added in v2.5.0

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