kvtest

package
v0.0.0-...-b4c7666 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicSubtests = []func(t *testing.T, store corekv.Store){

	SubtestBackendsGetSetDelete,
}

BasicSubtests is a list of all basic tests.

View Source
var ElemCount = 100

ElemCount sets with how many elements the datastore suit tests are usually run with. Best to set to round numbers like 20, 30, 40... and at least to 20.

Functions

func CheckDomain

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

func CheckInvalid

func CheckInvalid(t *testing.T, itr corekv.Iterator)

func CheckItem

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

func CheckKeyPanics

func CheckKeyPanics(t *testing.T, itr corekv.Iterator)

func CheckNext

func CheckNext(t *testing.T, itr corekv.Iterator, expected bool)

func CheckNextPanics

func CheckNextPanics(t *testing.T, itr corekv.Iterator)

func CheckValid

func CheckValid(t *testing.T, itr corekv.Iterator, expected bool)

func CheckValue

func CheckValue(t *testing.T, ctx context.Context, db corekv.Store, key []byte, valueWanted []byte)

func CheckValuePanics

func CheckValuePanics(t *testing.T, itr corekv.Iterator)

func SubtestAll

func SubtestAll(t *testing.T, store corekv.Store)

SubtestAll tests the given datastore against all the subtests.

func SubtestBackendsGetSetDelete

func SubtestBackendsGetSetDelete(t *testing.T, store corekv.Store)

func SubtestBasicPutGet

func SubtestBasicPutGet(t *testing.T, store corekv.Store)

func SubtestDBIterator

func SubtestDBIterator(t *testing.T, store corekv.Store)

func SubtestLimit

func SubtestLimit(t *testing.T, store corekv.Store)

func SubtestManyKeysAndQuery

func SubtestManyKeysAndQuery(t *testing.T, store corekv.Store)

func SubtestNotFounds

func SubtestNotFounds(t *testing.T, store corekv.Store)

func SubtestPrefix

func SubtestPrefix(t *testing.T, store corekv.Store)

func TestDBBatch

func TestDBBatch(t *testing.T, store corekv.Batchable)

func TestElemCount

func TestElemCount(t *testing.T)

func VerifyIterator

func VerifyIterator(t *testing.T, itr corekv.Iterator, expected []int64, msg string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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