Skip to content

Allow overriding testdb Postgres connection via env vars, skip podman…#4

Merged
aersam merged 2 commits into
mainfrom
followup-fixes
Jul 16, 2026
Merged

Allow overriding testdb Postgres connection via env vars, skip podman…#4
aersam merged 2 commits into
mainfrom
followup-fixes

Conversation

@aersam

@aersam aersam commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

… when DB already reachable

PGDEVKIT_TESTDB_HOST/PORT/USER/PASSWORD now override the container defaults, and ensure_container() first probes the target with a short (3s) timeout before ever shelling out to podman — plus the existing PGDEVKIT_SKIP_CONTAINER escape hatch now lives in one place.

Claude-Session: https://claude.ai/code/session_01KZ9GdQRrr1e1EHcZHb7496

aersam and others added 2 commits July 16, 2026 09:57
… when DB already reachable

PGDEVKIT_TESTDB_HOST/PORT/USER/PASSWORD now override the container
defaults, and ensure_container() first probes the target with a short
(3s) timeout before ever shelling out to podman — plus the existing
PGDEVKIT_SKIP_CONTAINER escape hatch now lives in one place.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZ9GdQRrr1e1EHcZHb7496
…vars

The finally block reloaded pgdevkit.testdb.constants while the
overridden PGDEVKIT_TESTDB_* env vars were still set (monkeypatch only
restores them after the test function returns), so the module stayed
loaded with otherhost/otheruser/otherpass for the rest of the test
session — breaking the real podman/postgres integration tests that ran
afterward in CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZ9GdQRrr1e1EHcZHb7496
@aersam
aersam merged commit e844e0e into main Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant