Skip to content

Commit 53ea41c

Browse files
authored
fix: index tests (#331)
1 parent d10b4e7 commit 53ea41c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/code_health.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions: {}
1111
jobs:
1212
run-tests:
1313
name: Run MongoDB tests
14-
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
14+
if: github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
1515
strategy:
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
@@ -38,7 +38,7 @@ jobs:
3838

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

6565
coverage:
6666
name: Report Coverage
67-
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
67+
if: always() && (github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository))
6868
runs-on: ubuntu-latest
6969
needs: [run-tests, run-atlas-tests]
7070
steps:

tests/integration/indexCheck.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ describe("IndexCheck integration tests", () => {
191191
collection: "aggregate-test-collection",
192192
pipeline: [
193193
{ $match: { category: "A" } }, // Now has index
194-
{ $group: { _id: "$category", count: { $sum: 1 } } },
195194
],
196195
},
197196
});
@@ -308,7 +307,7 @@ describe("IndexCheck integration tests", () => {
308307
expect(response.isError).toBeFalsy();
309308
const content = getResponseContent(response.content);
310309
expect(content).toContain("Deleted");
311-
expect(content).toMatch(/\d+ document\(s\)/);
310+
expect(content).toMatch(/`\d+` document\(s\)/);
312311
});
313312
});
314313
},

tests/integration/tools/mongodb/mongodbHelpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export function setupMongoDBIntegrationTest(): MongoDBIntegrationTest {
7070
tmpDir: dbsDir,
7171
logDir: path.join(tmpDir, "mongodb-runner", "logs"),
7272
topology: "standalone",
73+
version: "8.0.10",
7374
});
7475

7576
return;

0 commit comments

Comments
 (0)