testpg

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package testpg creates isolated PostgreSQL schemas for integration tests. It never substitutes an in-memory database for PostgreSQL behavior.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DB     *pgkit.DB
	Schema string
}

func Open

func Open(t testing.TB) Database

func OpenWithMaxConns

func OpenWithMaxConns(t testing.TB, maxConns int32) Database

OpenWithMaxConns creates an isolated real-PostgreSQL test database whose application pool has the requested capacity. Small pools are useful for proving that Flow releases its connection before invoking application code.

Jump to

Keyboard shortcuts

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