-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(NODE-6028): skip atlas connectivity free tier 4.4 #4041
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
Conversation
if (process.env.ATLAS_CONNECTIVITY == null) { | ||
console.error( | ||
'skipping atlas connectivity tests, ATLAS_CONNECTIVITY environment variable is not defined' | ||
); | ||
|
||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I delete this? if we accidentally removed the env var then these tests would silently skip right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
Did these tests live in tests/integration
at any point? I'm wondering if is here to prevent failures on regular integration runs.
let client; | ||
|
||
afterEach(async function () { | ||
await client.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled the close up to an after each
await client.close(); | ||
}); | ||
|
||
for (const configName of Object.keys(CONFIGS)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forEach -> for-of
for (const configName of Object.keys(CONFIGS)) { | ||
context(configName, function () { | ||
for (const connectionString of CONFIGS[configName]) { | ||
const name = connectionString.includes('mongodb+srv') ? 'mongodb+srv' : 'normal'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indexOf -> includes
const today = new Date(); | ||
// Making this April 1st so it is a monday | ||
const april1st2024 = new Date('2024-04-01'); | ||
if (today < april1st2024) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kinda fun TBH, if the upgrade doesn't happen we'll go red again otherwise this will just become dead code and we'll start testing it again 😎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎
const today = new Date(); | ||
// Making this April 1st so it is a monday | ||
const april1st2024 = new Date('2024-04-01'); | ||
if (today < april1st2024) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎
if (process.env.ATLAS_CONNECTIVITY == null) { | ||
console.error( | ||
'skipping atlas connectivity tests, ATLAS_CONNECTIVITY environment variable is not defined' | ||
); | ||
|
||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
Did these tests live in tests/integration
at any point? I'm wondering if is here to prevent failures on regular integration runs.
Description
What is changing?
Is there new documentation needed for these changes?
What is the motivation for this change?
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript