Raxx · internal docs

internal · gated ↑ index

ADR-0070: pytest-postgresql over testcontainers for Raptor test fixtures

Status: Accepted
Date: 2026-05-10 UTC
Epic: #1556 — Raptor SQLite → Postgres migration
Design doc: docs/architecture/raptor-postgres-migration/design.md §5


Context

Raptor's existing test suite uses SQLite in-memory or file fixtures. After the Postgres migration, tests must be runnable against Postgres in CI without requiring a running Postgres service on the developer's machine (local dev keeps the SQLite fallback). Three options were evaluated.


Decision

Use pytest-postgresql>=5.0 for Postgres test fixtures in CI. Maintain the existing SQLite fixture path for local dev (no DATABASE_URL set).


Consequences

Positive:

Negative:


Alternatives Considered

testcontainers (Docker)

Heroku PR-app ephemeral Postgres

SQLite for all tests (no Postgres CI)