chore(compose): add db-test service for pytest isolation #23

Merged
kaykayyali merged 1 commits from chore/test-db-service into main 2026-06-26 15:39:54 +00:00
Owner

Adds a separate Postgres on port 5433 (db-test service) with its own volume + credentials so the tests/conftest.py autouse reset_state TRUNCATE fixture can never touch the live orchestrator DB at port 5432.

Companion to kanban task t_82790f84 (conftest patch). The patch will set its DSN at db-test:5432 (in-container) / 127.0.0.1:5433 (host) and verify with a fresh pytest run that production work_items survives.

Adds a separate Postgres on port 5433 (db-test service) with its own volume + credentials so the `tests/conftest.py` autouse `reset_state` TRUNCATE fixture can never touch the live orchestrator DB at port 5432. Companion to kanban task `t_82790f84` (conftest patch). The patch will set its DSN at `db-test:5432` (in-container) / `127.0.0.1:5433` (host) and verify with a fresh `pytest` run that production `work_items` survives.
kaykayyali added 1 commit 2026-06-26 14:29:16 +00:00
chore(compose): add db-test service for pytest isolation
Some checks failed
test / contract-and-unit (pull_request) Failing after 14s
e0584030c7
Production DB at port 5432 holds live orchestrator state. The
tests/conftest.py autouse reset_state fixture runs TRUNCATE
against every table before every test. Today this connects to
the production DB and wipes working state silently.

Add a separate Postgres on port 5433 with its own volume and
credentials (damascus_test / damascus_test / damascus_test).
The conftest patch (filed as kanban task t_82790f84) will point
its DSN at db-test:5432 from inside the container and
127.0.0.1:5433 from the host, leaving prod untouched.

Bind-mount binding added: no new containers in the topology map
(db-test sits alongside db on the same Docker network).
kaykayyali merged commit 9c2a4da7b9 into main 2026-06-26 15:39:54 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/damascus-orchestrator#23