Skip to content

Integration tests with Testcontainers (Postgres) #26

@greatest0fallt1me

Description

@greatest0fallt1me

Description

Add optional Testcontainers-based integration tests hitting real Postgres for repository and migrations.

Requirements and context

  • Gated or marked slow; documented in README.
  • CI matrix optional.

Suggested execution

  • Fork the repository and create a branch (example below).
  • Implement changes in StreamPay-Backend (TypeScript / Express per package.json).
  • Keep the service secure, tested, and documented; prefer small, reviewable PRs.
git checkout -b test/testcontainers-postgres

Implementation targets

  • src/__tests__/integration/db.integration.test.ts.
  • Shared setup helper.

Tests and validation

  • Verify migrations apply cleanly.

  • Run npm test and npm run lint in StreamPay-Backend.

  • Cover edge cases; include test output and brief security notes in the PR description.

Guidelines

  • Target minimum 95% test coverage on new or changed backend code (or justify gaps).
  • Clear documentation (OpenAPI / README / inline docs as specified).
  • Timeframe: 96 hours from assignment.

Example commit message

test(backend): Postgres integration tests with Testcontainers

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions