Skip to content
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

test: Updated tests that used the context manager directly and instead use the tracer to access the segment context #2643

Merged

Conversation

bizob2828
Copy link
Member

Description

This PR updates all tests to interact with the tracer to get the segment context. This along with #2642 will centralize how we access the context and make it easier for future refactors.

…d use the tracer to access the segment context
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.18%. Comparing base (69c1ab8) to head (558d352).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2643      +/-   ##
==========================================
- Coverage   97.23%   97.18%   -0.05%     
==========================================
  Files         291      291              
  Lines       45941    45946       +5     
==========================================
- Hits        44670    44653      -17     
- Misses       1271     1293      +22     
Flag Coverage Δ
integration-tests-cjs-18.x 74.18% <100.00%> (+<0.01%) ⬆️
integration-tests-cjs-20.x 74.17% <100.00%> (-0.01%) ⬇️
integration-tests-cjs-22.x 74.22% <100.00%> (+<0.01%) ⬆️
integration-tests-esm-18.x 49.67% <40.00%> (-0.01%) ⬇️
integration-tests-esm-20.x 49.68% <40.00%> (-0.01%) ⬇️
integration-tests-esm-22.x 49.70% <40.00%> (-0.01%) ⬇️
unit-tests-18.x 88.86% <100.00%> (+<0.01%) ⬆️
unit-tests-20.x 88.84% <100.00%> (-0.02%) ⬇️
unit-tests-22.x 88.86% <100.00%> (+<0.01%) ⬆️
versioned-tests-18.x 78.93% <40.00%> (-0.19%) ⬇️
versioned-tests-20.x 78.97% <40.00%> (-0.17%) ⬇️
versioned-tests-22.x 78.94% <40.00%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jsumners-nr jsumners-nr left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@bizob2828 bizob2828 merged commit b917b3e into newrelic:main Oct 9, 2024
28 of 29 checks passed
@bizob2828 bizob2828 deleted the update-tests-using-context-manager branch October 9, 2024 13:44
@bizob2828 bizob2828 added the dev:tests Indicates only changes to tests label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:tests Indicates only changes to tests
Projects
Status: Done: Issues recently completed
Development

Successfully merging this pull request may close these issues.

2 participants