conformance

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package conformance is a shared test suite every gateway.Coordinator implementation must pass, so gateway.MemoryCoordinator and coordinator/redis.Coordinator (and any third-party implementation) are held to the exact same contract.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, factory func(t *testing.T) gateway.Coordinator)

Run exercises factory() against the gateway.Coordinator contract. factory must return a fresh, empty Coordinator; Run calls it once per subtest so implementations backed by a shared external service (e.g. Redis) do not see state leak between subtests as long as factory picks a fresh key namespace or database per call.

func RunCAS added in v0.2.0

func RunCAS(t *testing.T, factory func(t *testing.T) gateway.CASCoordinator)

RunCAS exercises factory() against the gateway.CASCoordinator contract, in addition to the base Coordinator contract Run already covers. Every CASCoordinator implementation (gateway.MemoryCoordinator, coordinator/redis.Coordinator, and any third party) must pass both Run and RunCAS.

Types

This section is empty.

Jump to

Keyboard shortcuts

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