-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add integration tests for Docker client and RabbitMq #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 integration tests for the Docker client and updates the CI workflow to run both unit and integration tests separately with merged coverage reporting. The changes improve test coverage for Docker operations and ensure that Docker is available during CI runs.
Key Changes:
- Added comprehensive integration tests for Docker client operations including container lifecycle, image management, and volume operations
- Created a platform-aware shell script to facilitate running integration tests locally
- Updated GitHub Actions workflow to run unit and integration tests separately, then merge coverage reports using
gocovmerge
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
internal/docker/docker_client_integration_test.go |
Adds 14 integration tests covering Docker client functionality including container creation, image pulling, volume mounting, and container lifecycle management |
run_integration_tests.sh |
Provides a platform-aware script that detects OS (macOS, Linux, Windows), configures Docker host, verifies Docker daemon accessibility, and runs integration tests |
.github/workflows/publish-coverage.yaml |
Updates CI workflow to start Docker service, run unit and integration tests separately, merge coverage reports, and upload to Codecov with error handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 16 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces integration testing for RabbitMQ functionality and improves the CI workflow to support these tests and more granular coverage reporting. The main changes include adding new integration test files for RabbitMQ connections and consumers, updating the GitHub Actions workflow to start RabbitMQ and Docker services for tests, splitting unit and integration test coverage, and providing a helper script for running integration tests locally.
Integration Testing Support
internal/rabbitmq/connection_integration_test.go, covering connection establishment, channel creation, queue declaration, and message publishing/consumption.internal/rabbitmq/consumer/consumer_integration_test.go.CI/CD Workflow Enhancements
.github/workflows/publish-coverage.yamlto startdockerandrabbitmqservices for the test job, enabling integration tests to run in CI.Developer Tooling
run_integration_tests.shscript to automate running integration tests locally, including starting RabbitMQ via Docker Compose and handling platform-specific Docker configuration.