-
Notifications
You must be signed in to change notification settings - Fork 919
GODRIVER-3337 Add support for testcontainers #2254
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
base: master
Are you sure you want to change the base?
GODRIVER-3337 Add support for testcontainers #2254
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 adds support for running integration tests using testcontainers instead of orchestration, which enables parallel test execution by allowing each test to run with its own containerized MongoDB instance.
Key Changes:
- Introduces containerized test infrastructure with testcontainers-go integration
- Adds wire protocol version testing across multiple MongoDB versions (4.0-8.0)
- Creates new
test-containerizedtask for running tests in isolated containers
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/test/wire_protocol_test.go | New test file validating minimum supported wire versions across MongoDB versions |
| internal/test/go.mod | New module configuration with testcontainers dependencies |
| internal/test/container/mongo.go | Container management utilities for spawning MongoDB test instances |
| internal/test/container/teardown.go | Teardown function type definition for cleanup |
| internal/test/doc.go | Package documentation for test utilities |
| etc/run-containerized-tests.sh | Shell script to execute containerized tests |
| Taskfile.yml | Adds test-containerized task definition |
| .evergreen/config.yml | CI configuration for containerized test execution |
| go.work | Includes new internal/test module in workspace |
| internal/test/goleak/go.mod | Fixes typo in module path (.go → .org) |
| internal/test/compilecheck/go.mod | Fixes typo in module path (.go → .org) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🧪 Performance ResultsCommit SHA: d65ad67The following benchmark tests for version 693346700c8a8200079769dc had statistically significant changes (i.e., |z-score| > 1.96):
For a comprehensive view of all microbenchmark results for this PR's commit, please check out the Evergreen perf task for this patch. |
API Change ReportNo changes found! |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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 11 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
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 11 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GODRIVER-3337
Summary
Add new
test-containerizedtask that will run integration tests using testcontainers rather than orchestration.Background & Motivation
Integration and prose tests take quite a lot of time to run, mostly because they all rely on the same orchestration. Containerizing would allow us to scale the number of orchestrations to the number of cores on the machine.