conformance

package
v0.0.0-...-fe2fe4f Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package conformance provides the reusable behavioral test suite every migration backend must pass without depending on its execution engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, harness Harness)

Run executes the engine-neutral migration behavior contract.

Types

type Harness

type Harness struct {
	NewRunner            func(*testing.T, fstest.MapFS) *migrations.Runner
	Exec                 func(*testing.T, string)
	TransactionalUp      string
	TransactionalDown    string
	NoTransactionUp      string
	NoTransactionDown    string
	TransactionalFailure string
	NoTransactionFailure string
	RemovePartialEffects string
}

Harness supplies engine-specific SQL and isolated runner construction. NewRunner must return runners sharing one fresh database when called more than once with the same *testing.T and isolated databases for different subtests. Exec is used only to remove reviewed partial effects before an explicit rolled-back recovery decision.

Jump to

Keyboard shortcuts

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