testpg

package
v0.11.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Overview

Package testpg provides isolated PostgreSQL schemas for integration tests. A configured but unavailable database is a test failure. Local runs without configuration skip database tests; OVERKILL_REQUIRE_TEST_DB=1 makes missing configuration a failure as well.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(t *testing.T) (*sql.DB, func())

Open creates a private schema and returns a pool whose search_path points to it on every connection. Cleanup is registered with t and is safe to call explicitly as well. Tests must not change search_path or use public tables.

Types

This section is empty.

Jump to

Keyboard shortcuts

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