testutil

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FinishTest

func FinishTest(t *testing.T, dir string, seed1, seed2 int64, keys, blocks int)

func InsertRandomKeys

func InsertRandomKeys(prefix string, n int, r repo.Repo) (int64, error)

InsertRandomKeys puts random keys in a repo.

func NewTestRepo

func NewTestRepo(t *testing.T, spec map[string]interface{}) (string, func(t *testing.T))

NewTestRepo creates a new repo for testing.

func OpenRepo

func OpenRepo(repoPath string) (repo.Repo, error)

OpenRepo opens a repo.

func PatchConfig

func PatchConfig(t *testing.T, configPath string, newSpecPath string)

PatchConfig replaces the datastore configuration in an existing configuration file.

func PrepareTest

func PrepareTest(t *testing.T, keys, blocks int) (string, func(t *testing.T), int64, int64)

func Verify

func Verify(prefix string, n int, seed int64, r repo.Repo) error

Verify checks that keys in the repository look as expected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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