Help us shape the future of Go! Take the 2026 Go Developer Survey

storetest

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package storetest holds the shared Store-driver conformance suite (RFC §13, AGENTS.md §9). Every Store driver must pass RunConformance; a new persistence guarantee is added here once and proven against every driver, never bolted onto one driver.

A driver's test wires the suite in with a few lines:

func TestConformance(t *testing.T) {
	storetest.RunConformance(t, func() store.Store { return inmem.New() })
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBenchmarks

func RunBenchmarks(b *testing.B, open func() store.Store)

RunBenchmarks exercises the Store's common operations under benchmark. open must return a freshly-constructed, empty Store on each call; the suite closes each Store it opens. A driver's *_test.go calls this from a BenchmarkXxx function.

func RunConformance

func RunConformance(t *testing.T, open func() store.Store)

RunConformance exercises every guarantee of the Store seam against a driver. open must return a freshly-constructed, empty Store on each call; the suite closes each Store it opens.

Types

This section is empty.

Jump to

Keyboard shortcuts

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