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

storetest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package storetest is the contract suite for pkg/store implementations (decision 0015). Every backend (inmem, SQLite in memory and on disk, PostgreSQL) runs Run with a factory that returns a fresh, empty store, so one set of expectations defines the behaviour of all of them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LongText

func LongText(n int) string

LongText returns n characters of random text, the same on every call. Half the characters are two or three bytes of UTF-8 and each is one UTF-16 code unit; all sort above "!" and none is an AQL wildcard.

func Run

func Run(t *testing.T, newStore Factory)

Run executes the full contract, one subtest per concern, each on its own store.

Types

type Factory

type Factory func(t *testing.T) store.Store

Factory returns a fresh, empty store and registers its cleanup with t.

Jump to

Keyboard shortcuts

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