Skip to content

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

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

nbbeeken
Copy link
Contributor

Description

What is changing?

  • skips the temporarily unusable atlas test cluster
  • Will stop skipping April 1st
Is there new documentation needed for these changes?
  • None

What is the motivation for this change?

  • Green CI

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

Comment on lines 18 to 24
if (process.env.ATLAS_CONNECTIVITY == null) {
console.error(
'skipping atlas connectivity tests, ATLAS_CONNECTIVITY environment variable is not defined'
);

return;
}
Copy link
Contributor Author

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?

Copy link
Contributor

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();
Copy link
Contributor Author

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)) {
Copy link
Contributor Author

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';
Copy link
Contributor Author

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) {
Copy link
Contributor Author

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 😎

Copy link
Contributor

Choose a reason for hiding this comment

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

😎

@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 18, 2024
baileympearson
baileympearson previously approved these changes Mar 18, 2024
const today = new Date();
// Making this April 1st so it is a monday
const april1st2024 = new Date('2024-04-01');
if (today < april1st2024) {
Copy link
Contributor

Choose a reason for hiding this comment

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

😎

Comment on lines 18 to 24
if (process.env.ATLAS_CONNECTIVITY == null) {
console.error(
'skipping atlas connectivity tests, ATLAS_CONNECTIVITY environment variable is not defined'
);

return;
}
Copy link
Contributor

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.

@baileympearson baileympearson merged commit 024e487 into main Mar 18, 2024
@baileympearson baileympearson deleted the NODE-6028-skip branch March 18, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants