-
Notifications
You must be signed in to change notification settings - Fork 154
feat: Add MongoDB integration tests with CI support #1382
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: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
==========================================
- Coverage 81.34% 81.25% -0.10%
==========================================
Files 65 65
Lines 4648 4657 +9
Branches 792 792
==========================================
+ Hits 3781 3784 +3
- Misses 852 858 +6
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@kriswest - Reviewed, looks good to me. Happy to close. -Paul |
jescalada
left a comment
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.
LGTM! 👍🏼
Summary
Adds comprehensive MongoDB integration tests for the database layer (repos, users, pushes) with CI integration. Tests run against a real MongoDB instance to validate database operations beyond unit test coverage.
Fixes #1168
What's New
Running Locally
Integration tests require MongoDB running on
localhost:27017. The connection string is configured invitest.config.integration.ts.The
RUN_MONGO_TESTSenvironment variable is automatically set by the vitest config, but can be overridden if needed.Running in CI
Integration tests run automatically in the CI pipeline after unit tests. MongoDB is already started via
supercharge/mongodb-github-actionin the build matrix (versions 6.0, 7.0, 8.0), so the tests execute against the existing MongoDB instance.The CI step simply runs:
Configuration
Connection string is set in
vitest.config.integration.ts:mongodb://localhost:27017/git-proxy-testgit-proxy-test(isolated from development data)test-integration.proxy.config.json(loaded viaCONFIG_FILEenv var)Benefits