Problem
Running the API suite locally ends with:
SKIPPED [1] tests/test_postgres_runtime.py:27: requires the dedicated CI PostgreSQL service
2901 passed, 1 skipped
Every contributor's local run skips it. The deployment runs PostgreSQL; the
local suite runs SQLite. So the one test that exercises the database the product
actually uses is the one nobody sees fail until CI does — usually after a push,
on someone else's branch.
What to do
Give contributors a way to run it without hand-assembling a database. A
make test-pg (or a documented docker compose run) that starts a throwaway
PostgreSQL, runs that file against it, and removes the container afterwards.
Two things it must not do:
- Leave a container or volume behind on failure
- Require the full self-hosting stack — this is one database for one test file,
not a deployment
Skipping must still work when Docker is unavailable. A contributor without it
should get the same skip they get today, not an error.
Where
services/api/tests/test_postgres_runtime.py — the skip condition at line 27
Makefile
CONTRIBUTING.md — the API section under "Local setup and checks"
Acceptance criteria
Problem
Running the API suite locally ends with:
Every contributor's local run skips it. The deployment runs PostgreSQL; the
local suite runs SQLite. So the one test that exercises the database the product
actually uses is the one nobody sees fail until CI does — usually after a push,
on someone else's branch.
What to do
Give contributors a way to run it without hand-assembling a database. A
make test-pg(or a documenteddocker compose run) that starts a throwawayPostgreSQL, runs that file against it, and removes the container afterwards.
Two things it must not do:
not a deployment
Skipping must still work when Docker is unavailable. A contributor without it
should get the same skip they get today, not an error.
Where
services/api/tests/test_postgres_runtime.py— the skip condition at line 27MakefileCONTRIBUTING.md— the API section under "Local setup and checks"Acceptance criteria
CONTRIBUTING.mdnames the command