Documentation
¶
Index ¶
- func AllowRevert(sm *mock_chainmanager.MockStateManager)
- func NewMockKVStore(ctrl *gomock.Controller) db.KVStore
- func NewMockStateManager(ctrl *gomock.Controller) *mock_chainmanager.MockStateManager
- func NewMockStateManagerWithoutHeightFunc(ctrl *gomock.Controller) *mock_chainmanager.MockStateManager
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.