Skip to content

Commit

Permalink
chore: bump the major version we run unit tests on in ci (#6378)
Browse files Browse the repository at this point in the history
bump the major version we run unit tests on in ci
  • Loading branch information
lerouxb authored Oct 18, 2024
1 parent 27da7ec commit 7d6b939
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .evergreen/print-compass-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

export MONGODB_DEFAULT_VERSION=6.0.x
export MONGODB_DEFAULT_VERSION=7.0.x

if [[ $OSTYPE == "cygwin" ]]; then
export PLATFORM='win32'
Expand Down
6 changes: 4 additions & 2 deletions packages/data-service/src/connect-mongo-client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ describe('connectMongoClient', function () {
expect(error).to.be.instanceOf(Error);

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

for (let i = 0; i < 10; i++) {
Expand Down
20 changes: 4 additions & 16 deletions packages/data-service/src/data-service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1199,10 +1199,7 @@ describe('DataService', function () {
it('throws an error', async function () {
await expect(
dataService.getSearchIndexes(testNamespace)
).to.be.rejectedWith(
MongoServerError,
/Unrecognized pipeline stage name: '\$listSearchIndexes'"|\$listSearchIndexes stage is only allowed on MongoDB Atlas/
);
).to.be.rejectedWith(MongoServerError);
});
});

Expand All @@ -1213,32 +1210,23 @@ describe('DataService', function () {
name: 'my-index',
definition: {},
})
).to.be.rejectedWith(
MongoServerError,
"no such command: 'createSearchIndexes'"
);
).to.be.rejectedWith(MongoServerError);
});
});

describe('#updateSearchIndex', function () {
it('throws an error', async function () {
await expect(
dataService.updateSearchIndex(testNamespace, 'my-index', {})
).to.be.rejectedWith(
MongoServerError,
"no such command: 'updateSearchIndex'"
);
).to.be.rejectedWith(MongoServerError);
});
});

describe('#dropSearchIndex', function () {
it('throws an error', async function () {
await expect(
dataService.dropSearchIndex(testNamespace, 'my-index')
).to.be.rejectedWith(
MongoServerError,
"no such command: 'dropSearchIndex'"
);
).to.be.rejectedWith(MongoServerError);
});
});

Expand Down

0 comments on commit 7d6b939

Please sign in to comment.