dbtest

package
v0.43.0-dev-malleabili... Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchWithStorages

func BenchWithStorages(t *testing.B, fn func(*testing.B, storage.Reader, WithWriter))

func RunFuncsWithNewBadgerDBHandle added in v0.42.1

func RunFuncsWithNewBadgerDBHandle(t *testing.T, fs ...func(*testing.T, storage.DB))

RunFuncsWithNewBadgerDBHandle runs provided functions with new BadgerDB handles of the same underlying database. Each provided function will receive a new (different) DB handle. This can be used to test database persistence.

func RunFuncsWithNewDBHandle added in v0.42.1

func RunFuncsWithNewDBHandle(t *testing.T, fn ...func(*testing.T, storage.DB))

RunFuncsWithNewPebbleDBHandle runs provided functions with new database handles of the same underlying database. Each provided function will receive a new (different) DB handle. This can be used to test database persistence.

func RunFuncsWithNewPebbleDBHandle added in v0.42.1

func RunFuncsWithNewPebbleDBHandle(t *testing.T, fs ...func(*testing.T, storage.DB))

RunFuncsWithNewPebbleDBHandle runs provided functions with new Pebble handles of the same underlying database. Each provided function will receive a new (different) DB handle. This can be used to test database persistence.

func RunWithBadger

func RunWithBadger(t *testing.T, fn func(*testing.T, storage.Reader, WithWriter))

func RunWithDB

func RunWithDB(t *testing.T, fn func(*testing.T, storage.DB))

func RunWithPebble

func RunWithPebble(t *testing.T, fn func(*testing.T, storage.Reader, WithWriter))

func RunWithPebbleDB

func RunWithPebbleDB(t *testing.T, opts *pebble.Options, fn func(*testing.T, storage.Reader, WithWriter, string, *pebble.DB))

func RunWithStorages

func RunWithStorages(t *testing.T, fn func(*testing.T, storage.Reader, WithWriter))

Types

type WithWriter

type WithWriter func(func(storage.Writer) error) error

helper types and functions

Jump to

Keyboard shortcuts

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