storagetest

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package storagetest contains high level API tests and test utils for other modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TmpDB

func TmpDB(ctx context.Context, t testing.TB, options ...Option) (*storage.DB, func())

TmpDB returns BadgerDB's storage implementation and cleanup function.

Creates BadgerDB in temporary directory and uses t for errors reporting.

Types

type Option added in v0.6.3

type Option func(*tmpDBOptions)

Option provides functional option for TmpDB.

func Dir added in v0.6.3

func Dir(dir string) Option

Dir defines temporary directory for database.

func DisableBootstrap added in v0.6.3

func DisableBootstrap() Option

DisableBootstrap skip bootstrap records creation.

Jump to

Keyboard shortcuts

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