testutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultContext

func DefaultContext(key storetypes.StoreKey, tkey storetypes.StoreKey) sdk.Context

DefaultContext creates a sdk.Context with a fresh MemDB that can be used in tests.

Types

type TestContext

type TestContext struct {
	Ctx sdk.Context
	DB  *dbm.MemDB
	CMS store.CommitMultiStore
}

func DefaultContextWithDB

func DefaultContextWithDB(t *testing.T, keys []storetypes.StoreKey, tkeys []storetypes.StoreKey) TestContext

type TestEncodingConfig

type TestEncodingConfig struct {
	InterfaceRegistry types.InterfaceRegistry
	Codec             codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

TestEncodingConfig defines an encoding configuration that is used for testing purposes. Note, MakeTestEncodingConfig takes a series of AppModuleBasic types which should only contain the relevant module being tested and any potential dependencies.

func MakeTestEncodingConfig

func MakeTestEncodingConfig(modules ...module.AppModuleBasic) TestEncodingConfig

Directories

Path Synopsis
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.

Jump to

Keyboard shortcuts

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