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

testdb

package
v0.0.0-...-d7687b9 Latest Latest
Warning

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

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

Documentation

Overview

Package testdb gives tests an isolated DBOS system database: SQLite in a temporary directory or, if MANENT_TEST_DATABASE_URL points to a Postgres server, a new database created for the single test and dropped at the end.

Index

Constants

View Source
const EnvURL = "MANENT_TEST_DATABASE_URL"

EnvURL is the variable with the URL of a Postgres server for tests (e.g. postgres://postgres:postgres@localhost:5432/postgres). The user must be able to create databases.

Variables

This section is empty.

Functions

func Postgres

func Postgres() bool

Postgres reports whether tests use Postgres.

func URL

func URL(t testing.TB) string

URL returns the URL of an empty database reserved for the test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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