Skip to content

test(NODE-6891): add coverage for all test runs #4508

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 4 commits into from
Apr 16, 2025
Merged

test(NODE-6891): add coverage for all test runs #4508

merged 4 commits into from
Apr 16, 2025

Conversation

durran
Copy link
Member

@durran durran commented Apr 15, 2025

Description

Update all relevant test runs to run with nyc to get better coverage reports.

What is changing?

Update package.json to prefix mocha runs with nyc.

Is there new documentation needed for these changes?

None

What is the motivation for this change?

NODE-6891

Release Highlight

Fill in title or leave empty for no highlight

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

@durran durran force-pushed the NODE-6891 branch 2 times, most recently from a7de81e to a85be3c Compare April 15, 2025 19:45
@durran durran marked this pull request as ready for review April 15, 2025 21:00
@durran durran requested a review from a team as a code owner April 15, 2025 21:00
@durran
Copy link
Member Author

durran commented Apr 15, 2025

Note that this PR didn't work for all OIDC tests, only the main test run, not all the individual container tests (AWS/GCP/Azure). Since this was intended to be a quick win ticket and timeboxed, I'm just putting it as ready for review to not spend more time on it now over prioritized work.

@durran
Copy link
Member Author

durran commented Apr 16, 2025

I've created NODE-6908 as a follow up for the container based tests.

Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

@nbbeeken nbbeeken self-assigned this Apr 16, 2025
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Apr 16, 2025
@durran
Copy link
Member Author

durran commented Apr 16, 2025

Looks good to me, but suspiciously x509 still is "uncovered" but we do have tests for it:

https://spruce.mongodb.com/task/mongo_node_driver_next_rhel80_large_Node20_test_x509_authentication_patch_4ac4f9d7db82c29e76c68e28bbd9dc4d469200e9_67fec469649b350007efb651_25_04_15_20_41_14/logs?execution=0&sortBy=STATUS&sortDir=ASC

and I can see the coverage report uploaded here, any ideas?

We seem to be excluding rhel80-large from our coverage reports. Do you know a reason why and can I just remove that exclude?

aws s3 cp --recursive s3://mciuploads/mongo-node-driver/4ac4f9d7db82c29e76c68e28bbd9dc4d469200e9/67fec469649b350007efb651/ coverage/ --exclude 'results.*.json' --exclude '*rhel80-large*' --include '*fermiun'

@durran durran requested a review from nbbeeken April 16, 2025 17:24
@nbbeeken
Copy link
Contributor

nbbeeken commented Apr 16, 2025

          # Download all the task coverage files.
          # NOTE: All coverage files are too large for V8 to handle the resulting call to
          #       JSON.stringify from within nyc, so with stick to Fermiun to include the
          #       compression tests.

"rhel80-large" is our default OS so its first excluding all of our linux tasks then including just the "fermiun"... which is Node.js 14 🤨 so maybe these conditions need an update (it is also misspelled, it's Fermium)

Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

Looks great!!

+1% :) nice.

@nbbeeken nbbeeken merged commit f0b8739 into main Apr 16, 2025
30 checks passed
@nbbeeken nbbeeken deleted the NODE-6891 branch April 16, 2025 22:28
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