testutil

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testutil provides the Postgres a DB-backed test runs against.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupTestDB

func SetupTestDB(t *testing.T) *pgxpool.Pool

SetupTestDB returns a pool onto a fresh, fully migrated database. The database is dropped when the test finishes.

func SetupTestDBAtVersion added in v0.10.0

func SetupTestDBAtVersion(t *testing.T, version int64) *pgxpool.Pool

SetupTestDBAtVersion is SetupTestDB stopped at a specific migration version, so a migration can be exercised against a populated older database rather than against a schema that already contains it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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