Repository navigation
feat: implement e2e tests - #47
Merged
pikann merged 11 commits intoMar 25, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a full end-to-end (E2E) HTTP smoke test for the API service using testcontainers-go to provision backing services at runtime, and updates CI to run these E2E tests as a separate job from unit/integration tests.
Changes:
- Adds a comprehensive E2E flow test that spins up Postgres + Redis containers, runs migrations, boots the service stack, and exercises auth/user endpoints.
- Updates the API PR CI workflow to (a) exclude E2E packages from the “Unit & integration tests” coverage run and (b) add a dedicated E2E test job.
- Adds
testcontainers-goand related dependencies to the API module.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
services/api/test/e2e/api_flow_test.go |
Implements containerized E2E HTTP flow tests (Postgres/Redis via testcontainers), migrations, and helper utilities. |
services/api/go.mod |
Adds github.com/testcontainers/testcontainers-go and required indirect dependencies. |
services/api/go.sum |
Records new dependency checksums from adding testcontainers-go. |
.github/workflows/api-pr-ci.yml |
Splits CI: unit/integration job excludes E2E packages; adds a dedicated E2E job running ./test/e2e/.... |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
Contributor
fix(e2e): use log-based wait strategy for Postgres container readiness
Scope TESTCONTAINERS_RYUK_DISABLED to Colima sockets only
This reverts commit 75f18d6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request updates the CI workflow and dependencies to improve how end-to-end (E2E) tests are run for the API service. The main change is the migration from using GitHub Actions service containers (for Postgres, Redis, RabbitMQ) to running E2E tests via
testcontainers-go, which manages its own containers programmatically. This streamlines the workflow and reduces external configuration. Additionally, several new dependencies are added to support this new approach.CI Workflow Improvements:
The "Unit & integration tests" job is renamed and updated to exclude E2E tests from its coverage, ensuring a clear separation between fast in-memory tests and full E2E tests. (
.github/workflows/api-pr-ci.yml) [1] [2]The E2E test job (
test-e2e) now runs the full HTTP flow usingtestcontainers-goinstead of relying on GitHub Actions service containers. This removes the need for explicit service configuration for Postgres, Redis, and RabbitMQ in the workflow file and simplifies environment setup. (.github/workflows/api-pr-ci.yml) [1] [2]Dependency Updates:
github.com/testcontainers/testcontainers-goand a set of related indirect dependencies togo.modto enable programmatic container management for E2E tests. (services/api/go.mod) [1] [2]## SummaryDescribe the change in a few sentences.
Type of Change
Checklist