Help us shape the future of Go! Take the 2026 Go Developer Survey

pgtest

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package pgtest gives the engine's tests a scratch Postgres database.

Index

Constants

View Source
const EnvURL = "WORKFLOW_TEST_DATABASE_URL"

EnvURL names the variable that points the tests at a Postgres server.

Variables

This section is empty.

Functions

func SQL

func SQL(t *testing.T, db *pgkit.DB) *sql.DB

SQL opens a database/sql handle on db's pool for the goose provider API.

func Scratch

func Scratch(t *testing.T) *pgkit.DB

Scratch creates a database on the EnvURL server, dropped on cleanup. Without EnvURL it skips, or fails when CI is set so a misconfigured job cannot pass.

Types

This section is empty.

Jump to

Keyboard shortcuts

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