testutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const SeedSQL = `` /* 794-byte string literal not displayed */

SeedSQL creates tables, indexes, constraints, and data for integration tests.

Variables

This section is empty.

Functions

func Setup

func Setup() (string, func(), error)

Setup starts a PostgreSQL container, seeds it with test data, and returns the connection string and a cleanup function. If PGSPECTRE_TEST_DB_URL is set, it seeds that database instead of Docker. Returns an error if Docker is not available.

func SetupPostgres

func SetupPostgres(t *testing.T) (string, func())

SetupPostgres is a test helper that starts a PostgreSQL container and seeds it. Skips the test if Docker is not available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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