Skip to content

Conversation

@lerouxb
Copy link
Contributor

@lerouxb lerouxb commented Oct 18, 2024

We were running unit tests on 6.0.x in CI and whatever mongodb-runner uses by default locally.

@lerouxb lerouxb force-pushed the bump-unit-test-mongodb-version branch from 5ee7063 to fc55a01 Compare October 18, 2024 10:20
set -e

export MONGODB_DEFAULT_VERSION=6.0.x
export MONGODB_DEFAULT_VERSION=7.0.x
Copy link
Contributor Author

@lerouxb lerouxb Oct 18, 2024

Choose a reason for hiding this comment

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

I'm thinking we should probably not set this here and use it in print-compass-env.js and then somehow rather fill in a default if nothing is set in the compass tests. That would be the only way to have a consistent default locally and in CI because we don't use this file when just doing npm test locally.

// 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we have to test for a specific message? can't we just confirm an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. I didn't write the original test and I don't want to unnecessarily change the intention.

Copy link
Collaborator

@paula-stacho paula-stacho Oct 18, 2024

Choose a reason for hiding this comment

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

or, if we want to test the propagation, is there a way to mock the server error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but this file is an integration test, not a unit test.

@lerouxb lerouxb merged commit 7d6b939 into main Oct 18, 2024
22 of 23 checks passed
@lerouxb lerouxb deleted the bump-unit-test-mongodb-version branch October 18, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants