testdb

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package testdb provides a shared PostgreSQL test container for integration tests. It starts a single container per test binary (via sync.Once), runs goose migrations, and returns a connection pool ready for use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Require

func Require(tb testing.TB) (string, *pgxpool.Pool)

Require starts a PostgreSQL test container (once per binary), runs goose migrations, and returns a fresh connection pool. The pool is closed via tb.Cleanup. Tables are truncated for test isolation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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