testutil

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllRefs

func AllRefs(ctx context.Context, t *testing.T, storeFactory func() bs.Store)

AllRefs writes a random set of random blobs to an empty store and makes sure that the right set of refs comes back in a call to ListRefs.

func Anchors

func Anchors(ctx context.Context, t *testing.T, store anchor.Store, isNew bool)

Anchors tests writing, reading, and listing anchors. Argument isNew tells whether to expect store to be a new, empty store. (If it is, Anchors tests that AnchorMapRef returns ErrNoAnchorMap.)

func ReadWrite

func ReadWrite(ctx context.Context, t *testing.T, store bs.Store, data []byte)

ReadWrite permits testing a Store implementation by split-writing some data to it, then reading it back out to make sure it's the same.

Types

This section is empty.

Jump to

Keyboard shortcuts

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