Skip to content

Commit 7d6b939

Browse files
authored
chore: bump the major version we run unit tests on in ci (#6378)
bump the major version we run unit tests on in ci
1 parent 27da7ec commit 7d6b939

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

.evergreen/print-compass-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
export MONGODB_DEFAULT_VERSION=6.0.x
5+
export MONGODB_DEFAULT_VERSION=7.0.x
66

77
if [[ $OSTYPE == "cygwin" ]]; then
88
export PLATFORM='win32'

packages/data-service/src/connect-mongo-client.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ describe('connectMongoClient', function () {
252252
expect(error).to.be.instanceOf(Error);
253253

254254
// propagates the tunnel error
255-
expect(error.message).to.match(
256-
/(All configured authentication methods failed|ENOTFOUND compass-tests\.fakehost\.localhost)/
255+
// NOTE: this heavily depends on which server version we're running on
256+
const message = error.errors ? error.errors[0].message : error.message;
257+
expect(message).to.match(
258+
/(All configured authentication methods failed|ENOTFOUND compass-tests\.fakehost\.localhost)|ECONNREFUSED 127.0.0.1:22/
257259
);
258260

259261
for (let i = 0; i < 10; i++) {

packages/data-service/src/data-service.spec.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,10 +1199,7 @@ describe('DataService', function () {
11991199
it('throws an error', async function () {
12001200
await expect(
12011201
dataService.getSearchIndexes(testNamespace)
1202-
).to.be.rejectedWith(
1203-
MongoServerError,
1204-
/Unrecognized pipeline stage name: '\$listSearchIndexes'"|\$listSearchIndexes stage is only allowed on MongoDB Atlas/
1205-
);
1202+
).to.be.rejectedWith(MongoServerError);
12061203
});
12071204
});
12081205

@@ -1213,32 +1210,23 @@ describe('DataService', function () {
12131210
name: 'my-index',
12141211
definition: {},
12151212
})
1216-
).to.be.rejectedWith(
1217-
MongoServerError,
1218-
"no such command: 'createSearchIndexes'"
1219-
);
1213+
).to.be.rejectedWith(MongoServerError);
12201214
});
12211215
});
12221216

12231217
describe('#updateSearchIndex', function () {
12241218
it('throws an error', async function () {
12251219
await expect(
12261220
dataService.updateSearchIndex(testNamespace, 'my-index', {})
1227-
).to.be.rejectedWith(
1228-
MongoServerError,
1229-
"no such command: 'updateSearchIndex'"
1230-
);
1221+
).to.be.rejectedWith(MongoServerError);
12311222
});
12321223
});
12331224

12341225
describe('#dropSearchIndex', function () {
12351226
it('throws an error', async function () {
12361227
await expect(
12371228
dataService.dropSearchIndex(testNamespace, 'my-index')
1238-
).to.be.rejectedWith(
1239-
MongoServerError,
1240-
"no such command: 'dropSearchIndex'"
1241-
);
1229+
).to.be.rejectedWith(MongoServerError);
12421230
});
12431231
});
12441232

0 commit comments

Comments
 (0)