Documentation
¶
Overview ¶
Package testharness provides a Postgres test harness for migration driver tests. Each call to New() creates an isolated PostgreSQL schema so tests don't pollute each other's state.
Backend selection:
- ProvidedDSN — if WORKFLOW_MIGRATE_TEST_DSN env var is set.
- EmbeddedPostgres — Fergus Strange's pure-Go embedded Postgres (default).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Harness ¶
type Harness struct {
// contains filtered or unexported fields
}
Harness wraps a running Postgres instance with an isolated schema.
func New ¶
New creates and starts a new Postgres harness with an isolated schema. The caller must defer h.Close(t) to clean up the schema and stop the server.
Click to show internal directories.
Click to hide internal directories.