dbtest

package
v0.44.6 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: AGPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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