Discover Packages
github.com/robinjoseph08/memento
pkg
testdb
package
Version:
v0.7.0
Opens a new window with list of versions in this module.
Published: Oct 30, 2026
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package testdb isolates integration tests and local QA in temporary PostgreSQL schemas.
New migrates an isolated schema per top-level test and records setup cost.
TEST_DATABASE_URL overrides the local worktree database, and is required in CI.
Open uses a small pool suitable for isolated tests and fixture processes.
type Schema struct {
URL string
}
Schema owns a temporary schema. Close its application pools before Close.
NewSchema creates an empty schema without touching existing application data.
Close drops only the schema allocated by NewSchema and closes its pool.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.