testpostgres

package
v0.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testpostgres provides isolated PostgreSQL schemas for repository integration tests. It is unavailable to external consumers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(t testing.TB, config Config) *sql.DB

Open returns a pool whose search_path is pinned to Config.ApplicationSchema.

func QuoteIdentifier

func QuoteIdentifier(identifier string) string

QuoteIdentifier quotes a trusted PostgreSQL identifier.

Types

type Config

type Config struct {
	URL               string
	ApplicationSchema string
	QueueSchema       string
}

Config identifies one isolated application and River schema pair.

func New

func New(t testing.TB) Config

New reserves unique schema names and registers cleanup. The schemas remain absent until the PostgreSQL adapter starts, preserving composition purity.

Jump to

Keyboard shortcuts

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