Skip to content

fix: index tests #331

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

Merged
merged 3 commits into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/code_health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions: {}
jobs:
run-tests:
name: Run MongoDB tests
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -38,7 +38,7 @@ jobs:

run-atlas-tests:
name: Run Atlas tests
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
if: github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
Expand All @@ -64,7 +64,7 @@ jobs:

coverage:
name: Report Coverage
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
if: always() && (github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository))
runs-on: ubuntu-latest
needs: [run-tests, run-atlas-tests]
steps:
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/indexCheck.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ describe("IndexCheck integration tests", () => {
collection: "aggregate-test-collection",
pipeline: [
{ $match: { category: "A" } }, // Now has index
{ $group: { _id: "$category", count: { $sum: 1 } } },
],
},
});
Expand Down Expand Up @@ -308,7 +307,7 @@ describe("IndexCheck integration tests", () => {
expect(response.isError).toBeFalsy();
const content = getResponseContent(response.content);
expect(content).toContain("Deleted");
expect(content).toMatch(/\d+ document\(s\)/);
expect(content).toMatch(/`\d+` document\(s\)/);
});
});
},
Expand Down
1 change: 1 addition & 0 deletions tests/integration/tools/mongodb/mongodbHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export function setupMongoDBIntegrationTest(): MongoDBIntegrationTest {
tmpDir: dbsDir,
logDir: path.join(tmpDir, "mongodb-runner", "logs"),
topology: "standalone",
version: "8.0.10",
Copy link
Preview

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a comment to clarify why MongoDB version 8.0.10 is hard-coded here or parameterize it for future flexibility.

Suggested change
version: "8.0.10",
version: DEFAULT_MONGODB_VERSION,

Copilot uses AI. Check for mistakes.

});

return;
Expand Down
Loading