ledgerconformance

package
v0.14.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ledgerconformance provides a shared conformance test suite for the tool.ReadLedger interface (ADR 0281). Adapters (the in-memory reference memledger, a durable Redis-backed implementation, ...) call Run with a factory that constructs a fresh ledger, and the suite exercises only the tool.ReadLedger interface.

Importing "testing" in a non-_test.go file is intentional here: this is a test-helper package whose sole purpose is to be imported by adapter tests, the conventional Go pattern for shared conformance suites (cf. testing/fstest and the sibling fsconformance/memconformance packages).

The suite pins the CONTRACT — exact-token round trip, ordinary absence, and concurrent access — not the implementation: durability, storage encoding, and failure-classification detail beyond "absence vs error" are adapter-internal and deliberately NOT asserted here (a durable adapter's own tests cover its failure classification, e.g. TestPersistentReadLedgers_Scenario2_*).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newLedger func(t *testing.T) tool.ReadLedger)

Run executes the shared ReadLedger conformance table against the ledger produced by newLedger. newLedger must return a fresh, isolated ledger each call.

Types

This section is empty.

Jump to

Keyboard shortcuts

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