Documentation ¶
Index ¶
- func ApplyMigration(t *testing.T, ...)
- func DumpDB(tx kvdb.ReadTx, rootKey []byte) error
- func Hex(value string) string
- func MakeDB() (kvdb.Backend, func(), error)
- func RestoreDB(tx kvdb.RwTx, rootKey []byte, data map[string]interface{}) error
- func VerifyDB(tx kvdb.ReadTx, rootKey []byte, data map[string]interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyMigration ¶
func ApplyMigration(t *testing.T, beforeMigration, afterMigration, migrationFunc func(tx kvdb.RwTx) error, shouldFail bool)
ApplyMigration is a helper test function that encapsulates the general steps which are needed to properly check the result of applying migration function.
func DumpDB ¶
DumpDB dumps go code describing the contents of the database to stdout. This function is only intended for use during development.
Example output:
map[string]interface{}{ hex("1234"): map[string]interface{}{ "human-readable": hex("102030"), hex("1111"): hex("5783492373"), }, }
func MakeDB ¶
MakeDB creates a new instance of the ChannelDB for testing purposes. A callback which cleans up the created temporary directories is also returned and intended to be executed after the test completes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.