storetest

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package storetest provides correctness tests for implementations of the blob.KV interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NopCloser added in v0.8.0

func NopCloser(s blob.Store) blob.StoreCloser

NopCloser wraps a blob.Store with a no-op Close method to implement blob.StoreCloser.

func Run

func Run(t *testing.T, s blob.StoreCloser)

Run applies the test script to empty store s, then closes s. Any errors are reported to t. After Run returns, the contents of s are garbage.

func SubCAS added in v0.9.0

func SubCAS(t *testing.T, ctx context.Context, s blob.Store, names ...string) blob.CAS

SubCAS traverses a sequence of zero or more subspace names beginning at s, and returns a CAS for the last name in the sequence. Any error during traversal logs a failure in t.

func SubKV added in v0.9.0

func SubKV(t *testing.T, ctx context.Context, s blob.Store, names ...string) blob.KV

SubKV traverses a sequence of zero or more subspace names beginning at s, and returns a KV for the last name in the sequence. Any error during traversal logs a failure in t.

Types

This section is empty.

Jump to

Keyboard shortcuts

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