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

storecontract

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package storecontract is the shared conformance suite for the store port (ADR-0006). RunContract asserts the store SEMANTICS that must hold identically for every Engine — memory and badger run it, proving the in-memory fake behaves like the real engine (the driver-conformance-parity scenario).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restore added in v0.10.0

func Restore(t *testing.T, src store.Store, dst store.Engine) store.Store

Restore loads src's snapshot into the empty engine dst and opens it: a store restored from src.

func RunContract

func RunContract(t *testing.T, newStore func(t *testing.T) store.Store)

RunContract runs the engine-agnostic store scenarios against a Store built by newStore. newStore must return a fresh, empty store on each call.

func SnapshotSubject added in v0.10.0

func SnapshotSubject(t *testing.T, eng store.Engine) snapshotcontract.Subject

SnapshotSubject is a metastore over the empty engine eng for snapshotcontract.Run: Load goes to the engine, before store.New; Snapshot and Set go through the Store, opened on first use. Set writes a ConfigMap.

Types

This section is empty.

Jump to

Keyboard shortcuts

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