Documentation
¶
Overview ¶
Package pgtest gives each test its own PostgreSQL database.
Without GLABS_TEST_PG_URI the tests skip, unless GLABS_TEST_PG_REQUIRED is set, which turns the skip into a failure. CI sets both, so a database that fails to come up breaks the build instead of quietly skipping every test -- without that, "green" and "never ran" are indistinguishable.
The databases are created from a TEMPLATE rather than migrated one by one. Today that saves little; it is the shape that keeps the suite fast as the schema grows, and it is what plexams.go arrived at with 64 tables.
Deliberately no Testcontainers. The dev container mounts no Docker socket, so a container per test could not start there at all; pointing an environment variable at a database that already exists works in both places.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.