Skip to content

Add testcontainers-python fixtures for PostgreSQL tests #314

@peteski22

Description

@peteski22

Part of #257 — Phase 2 step (4).
RFC: #275.

Blocked by the PostgresStore implementation Phase 2 child.

Scope

Add to server/backend/pyproject.toml dev dependencies:

  • testcontainers[postgres]>=4.14.2,<5 (current latest at the time of
    writing — bump to latest at PR time)

Regenerate and commit uv.lock.

Provide a session-scoped pytest fixture that starts a PostgreSQL
container, runs migrations, and yields a PostgresStore connected to
it.

Definition of Done

  • Fixture available and used by at least one Postgres-only test.
  • Full test suite green locally with Docker available.
  • Lint clean.
  • README note for contributors: tests requiring Postgres need Docker
    running; SQLite-only tests still work without it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfraDocker, CI, Makefileteam-apiTeam API / Docker component

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions