Tech Debt: Containerized Acceptance Testing Strategy (E2E)
Context
During acceptance testing we identified a gap in the async-request-backend repository:
there is no defined strategy for building and running containers specifically for end‑to‑end acceptance tests.
- Current State: Unit and integration tests exist, but they run in isolation or with mocked components.
- Risk: The contract between the request‑api (producer) and request‑processor (consumer) may break without detection until deployment.
- Impact: Lack of reproducible acceptance testing increases the chance of regressions in asynchronous workflows.
Problem Statement
We need a containerized strategy to spin up all required services (Postgres, Request API, Request Processor, Celery worker queue) so acceptance tests can run against a real environment.
This is technical debt because the absence of such a strategy makes our testing incomplete and fragile.
Proposed Remediation
Adopt a “Spin Up, Trigger” strategy:
- Infrastructure: Create a dedicated
docker-compose.test.yml to spin up Postgres,celery sqs, Request API, and Request Processor.
- Test Logic: Update acceptance tests to issue a real HTTP POST to the API and poll the status endpoint until the Worker updates the DB to
COMPLETED.
- CI/CD: Update GitHub Actions workflow (
test.yml) to launch these containers before running the test suite.
- Maintenance: Update Makefiles to separate unit tests from containerized acceptance tests.
Tasks
Acceptance Criteria
- Running docker compose locally starts all required services.
- GitHub Action acceptance tests job passes green.
- No mocked databases; acceptance scope must use containerized Postgres.
Tech Debt: Containerized Acceptance Testing Strategy (E2E)
Context
During acceptance testing we identified a gap in the
async-request-backendrepository:there is no defined strategy for building and running containers specifically for end‑to‑end acceptance tests.
Problem Statement
We need a containerized strategy to spin up all required services (Postgres, Request API, Request Processor, Celery worker queue) so acceptance tests can run against a real environment.
This is technical debt because the absence of such a strategy makes our testing incomplete and fragile.
Proposed Remediation
Adopt a “Spin Up, Trigger” strategy:
docker-compose.test.ymlto spin up Postgres,celery sqs, Request API, and Request Processor.COMPLETED.test.yml) to launch these containers before running the test suite.Tasks
docker-compose.test.ymlwith Postgres, celery sqs, Request API, Request Processor.DATABASE_URL,CELERY_BROKER_URL).Acceptance Criteria