Documentation
¶
Overview ¶
Package conformance provides a test suite that every MigrationDriver must pass. Third-party driver authors import this package and call Suite.Run(t, driver) to verify their implementation against the standard behavioural matrix.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaseResult ¶
CaseResult holds the outcome of a single conformance case.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes the conformance suite without requiring *testing.T. It is used by the `migrate test` CLI subcommand and can be embedded in integration-test harnesses that need pass/fail results as Go values.
func NewRunner ¶
func NewRunner(dsn, dir string, d interfaces.MigrationDriver) *Runner
NewRunner creates a Runner for the given driver, DSN, and migration directory.
type Suite ¶
type Suite struct {
// DSN is the PostgreSQL connection string to use.
DSN string
// contains filtered or unexported fields
}
Suite runs the conformance test matrix against a given MigrationDriver.
func (*Suite) Run ¶
func (s *Suite) Run(t *testing.T, d interfaces.MigrationDriver)
Run executes all conformance cases against the given driver. The corpus format is selected based on the driver name (goose uses combined SQL files with -- +goose Up/Down annotations; others use paired .up.sql/.down.sql files).