testutil

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil holds test support shared by dispatcher packages. It is not imported by production code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrations

func ApplyMigrations(t *testing.T, db *sql.DB, directory string)

ApplyMigrations initialises a fresh test database from the goose migration files in directory, in filename order, executing only each file's "-- +goose up" section. It understands the plain SQL those files currently contain (statements separated by ";", CRLF normalised, marker case ignored) and fails the test on any other goose directive. It records each applied file in the schema version table, so the result is the same state a migration run leaves behind. It is support for fresh test databases, not a production migration tool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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