eptest

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package eptest binds an embedded PostgreSQL instance to Go tests and suites.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(m *testing.M, setup func(*postgres.EmbeddedPostgres), configs ...postgres.Config) (code int)

Run starts one server for TestMain, calls setup (if non-nil), runs m, and closes the server before returning the exit code. Call os.Exit only on the result. Independent supervision also covers unrecovered panics in test goroutines.

func Start

func Start(t testing.TB, configs ...postgres.Config) *postgres.EmbeddedPostgres

Start starts an isolated server and registers cleanup before startup. Defaults choose a dynamic port. An explicit Config is honoured, including its port. Cleanup owns normal teardown; test-context cancellation does not race it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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