Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseTestDBURL ¶
func BaseTestDBURL() string
BaseTestDBURL returns the configured base URL without the per-workspace, per-package suffix — the database an administrative probe connects to.
func OpenPreparedTestDB ¶
func TestDBURL ¶
func TestDBURL() string
TestDBURL returns the database URL tests should use. Inside a `go test` binary it derives a PER-WORKSPACE, PER-BINARY database name (<base>_ws<workspace>_pkg_<binary>) so packages can run in parallel and separate checkouts cannot truncate each other's rows: the harness truncates tables between tests, which made shared databases the documented cross-package and cross-worktree flake source. The suffix comes from the binary's name (os.Args[0] = <package>.test for go test), so every URL consumer in one process — TestDB, hand-built pools, and the in-process contract server — lands on the same database. E2A_TEST_DB_SHARED=1 gets the base URL verbatim. Missing databases self-provision on first open (see OpenPreparedTestDB). Concurrent sessions, agents, and worktrees are isolated by the per-workspace component below, so handing each runner its own base URL is no longer required — only useful for pointing a run at an entirely separate server.
Types ¶
This section is empty.