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

apptest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package apptest gives integration tests an App on a fresh, disposable database.

TEST_DATABASE_URL must point at a PostgreSQL server used only for tests, such as the one task test:integration starts. Each call creates a new database on that server, applies the migrations in cfg, and drops the database when the test ends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t testing.TB, cfg app.Config) *app.App

New returns an App whose database has cfg.Migrations applied. It does not run cfg.Setup: tests construct the modules they need, usually with test providers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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