Skip to content

feat: implement e2e tests - #47

Merged
pikann merged 11 commits into
31-epic-authentication-authorizationfrom
feature/implement-e2e-tests
Mar 25, 2026
Merged

pikann merged 11 commits into
31-epic-authentication-authorizationfrom
feature/implement-e2e-tests

Conversation

@pikann

@pikann pikann commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

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 using testcontainers-go instead 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:

  • Adds github.com/testcontainers/testcontainers-go and a set of related indirect dependencies to go.mod to enable programmatic container management for E2E tests. (services/api/go.mod) [1] [2]## Summary

Describe the change in a few sentences.

Type of Change

  • Documentation
  • Repository structure
  • Architecture clarification
  • Scaffolding
  • Other

Checklist

  • The change is focused and scoped.
  • Related documentation is updated.
  • New structure or direction is explained clearly.
  • I avoided unnecessary detail or premature abstraction.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-go and 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.

Comment thread services/api/test/e2e/api_flow_test.go Resolved
Comment thread services/api/test/e2e/api_flow_test.go Resolved
Comment thread services/api/test/e2e/api_flow_test.go Resolved
Comment thread services/api/test/e2e/api_flow_test.go Resolved

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

@pikann I've opened a new pull request, #48, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

@pikann I've opened a new pull request, #49, to work on those changes. Once the pull request is ready, I'll request review from you.

@pikann
pikann merged commit d5eb38a into 31-epic-authentication-authorization Mar 25, 2026
4 checks passed
@pikann
pikann deleted the feature/implement-e2e-tests branch March 25, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants