Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make the Docker-based test workflow more reliable by isolating test containers/resources from the dev stack and improving cleanup behavior.
Changes:
- Updates
yarn test:dockerto run tests under a fixed Compose project name and ensuredocker compose down -v --remove-orphansruns on exit. - Adjusts the test Compose stack to use distinct (and configurable) container names and to mount
/app/node_modules. - Parameterizes container names in shared Compose files to allow per-environment overrides.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updates test:docker script to run in a dedicated Compose project and auto-clean up on exit. |
| docker-compose.test.yml | Uses test-specific (configurable) container names and adds a node_modules volume mount for the test container. |
| docker-compose.db.yml | Makes container names configurable via environment variable substitution. |
| docker-compose.api.yml | Makes the API container name configurable via environment variable substitution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "test": "jest --config=testing/jest.config.ts", | ||
| "test:watch": "jest --config=testing/jest.config.ts --watch", | ||
| "test:docker": "docker compose -f docker-compose.test.yml run --rm test yarn test", | ||
| "test:docker": "sh -c 'trap \"docker compose -p rp-api-test -f docker-compose.test.yml down -v --remove-orphans\" EXIT; docker compose -p rp-api-test -f docker-compose.test.yml run --rm test yarn test'", |
| extends: | ||
| file: docker-compose.db.yml | ||
| service: kong | ||
| container_name: ${RP_KONG_CONTAINER_NAME:-rp-test-kong} |
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.
No description provided.