testutil

package
v0.0.0-...-25ef478 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0, BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BadgerDB

func BadgerDB(t *testing.T) (kvstore.KVStore, error)

BadgerDB creates a temporary BadgerKVStore that automatically gets cleaned up when the test finishes.

func PebbleDB

func PebbleDB(t *testing.T) (kvstore.KVStore, error)

PebbleDB creates a temporary PebbleKVStore that automatically gets cleaned up when the test finishes.

func Rand32ByteArray

func Rand32ByteArray() [32]byte

Rand32ByteArray returns an array with 32 random bytes.

func Rand49ByteArray

func Rand49ByteArray() [49]byte

Rand49ByteArray returns an array with 49 random bytes.

func Rand64ByteArray

func Rand64ByteArray() [64]byte

Rand64ByteArray returns an array with 64 random bytes.

func RandBytes

func RandBytes(length int) []byte

RandBytes returns length amount random bytes.

func RocksDB

func RocksDB(t *testing.T) (kvstore.KVStore, error)

RocksDB creates a temporary RocksDBKVStore that automatically gets cleaned up when the test finishes.

func SortedRand32BytArray

func SortedRand32BytArray(count int) [][32]byte

SortedRand32BytArray returns a count length slice of sorted 32 byte arrays.

func TempDir

func TempDir(t *testing.T) (string, error)

TempDir creates a temporary directory, that automatically gets cleaned up when the test finishes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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