storecontract

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package storecontract holds reusable contract tests for app.Store implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAll

func RunAll(t *testing.T, newStore func(*testing.T) app.Store)

RunAll exercises the secure-session store port (memory, SQLite, etc.). newStore is called from each subtest with that subtest's *testing.T so construction failures and testing.T.Cleanup hooks are attributed to the correct subtest.

func RunParitySuite

func RunParitySuite(t *testing.T, f ParityFixture)

RunParitySuite executes the canonical behavioral, capability, and restart parity suite for secure session persistence against the provided fixture.

func RunQuarantineContracts

func RunQuarantineContracts(t *testing.T, newStore func(*testing.T) app.Store)

RunQuarantineContracts exercises Phase-5 quarantine store semantics. Exercises durable quarantine store semantics.

Types

type ParityFixture

type ParityFixture interface {
	NewStore(t *testing.T) app.Store
	ReopenStore(t *testing.T) (app.Store, func() app.Store)
}

ParityFixture abstracts backend-specific store construction and lifecycle for canonical database parity testing across SQLite and PostgreSQL.

Jump to

Keyboard shortcuts

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