dbtest

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertDomain

func AssertDomain(t *testing.T, itr dbm.Iterator, start, end []byte)

func AssertInvalid

func AssertInvalid(t *testing.T, itr dbm.Iterator)

func AssertItem

func AssertItem(t *testing.T, itr dbm.Iterator, key, value []byte)

func AssertKeyPanics

func AssertKeyPanics(t *testing.T, itr dbm.Iterator)

func AssertNext

func AssertNext(t *testing.T, itr dbm.Iterator, expected bool)

func AssertValue

func AssertValue(t *testing.T, db dbm.DBReader, key, valueWanted []byte)

func AssertValuePanics

func AssertValuePanics(t *testing.T, itr dbm.Iterator)

func BenchmarkRandomReadsWrites

func BenchmarkRandomReadsWrites(b *testing.B, db dbm.DBReadWriter)

func BenchmarkRangeScans

func BenchmarkRangeScans(b *testing.B, db dbm.DBReadWriter, dbSize int64)

func BytesToInt64

func BytesToInt64(buf []byte) int64

func DoTestGetSetHasDelete

func DoTestGetSetHasDelete(t *testing.T, load Loader)

func DoTestIterators

func DoTestIterators(t *testing.T, load Loader)

func DoTestReloadDB

func DoTestReloadDB(t *testing.T, load Loader)

Tests reloading a saved DB from disk.

func DoTestRevert

func DoTestRevert(t *testing.T, load Loader, reload bool)

Test that Revert works as intended, optionally closing and reloading the DB both before and after reverting

func DoTestTransactions

func DoTestTransactions(t *testing.T, load Loader, multipleWriters bool)

func DoTestVersioning

func DoTestVersioning(t *testing.T, load Loader)

func Int64ToBytes

func Int64ToBytes(i int64) []byte

Types

type Loader

type Loader func(*testing.T, string) dbm.DBConnection

Jump to

Keyboard shortcuts

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