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

chore: Fixed dns integration tests #2883

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jsumners-nr
Copy link
Contributor

While trying to investigate other issues this morning, our integration suite started failing. It seems that resolve('example.com') has started returning a set of IPs instead of a single IP as our suite expected. In my opinion, we should not be relying on external infrastructure for our test suites. So I updated these tests to resolve in our expected manners. The other solution would be to update the test to something like assert.equal(ips.length > 0, true).

@jsumners-nr jsumners-nr marked this pull request as ready for review January 15, 2025 14:52
@jsumners-nr jsumners-nr requested a review from bizob2828 January 15, 2025 15:03
@jsumners-nr jsumners-nr added the dev:tests Indicates only changes to tests label Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.35%. Comparing base (73985ea) to head (ef8a73c).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2883      +/-   ##
==========================================
- Coverage   97.40%   97.35%   -0.05%     
==========================================
  Files         308      308              
  Lines       47369    47369              
==========================================
- Hits        46138    46116      -22     
- Misses       1231     1253      +22     
Flag Coverage Δ
integration-tests-cjs-18.x 73.20% <ø> (ø)
integration-tests-cjs-20.x 73.20% <ø> (ø)
integration-tests-cjs-22.x 73.22% <ø> (-0.01%) ⬇️
integration-tests-esm-18.x 49.84% <ø> (ø)
integration-tests-esm-20.x 49.84% <ø> (ø)
integration-tests-esm-22.x 49.89% <ø> (ø)
unit-tests-18.x 89.12% <ø> (ø)
unit-tests-20.x 89.12% <ø> (ø)
unit-tests-22.x 89.11% <ø> (-0.02%) ⬇️
versioned-tests-18.x 79.21% <ø> (-0.19%) ⬇️
versioned-tests-20.x 79.21% <ø> (-0.19%) ⬇️
versioned-tests-22.x 79.25% <ø> (-0.17%) ⬇️

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
Member

@bizob2828 bizob2828 left a comment

Choose a reason for hiding this comment

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

LGTM. mocking out all the methods we call is prob safest, long term strategy. I assume we assert the return from the methods because we want to ensure we don't break it during instrumentation.

@bizob2828 bizob2828 merged commit dd30ad7 into newrelic:main Jan 15, 2025
28 of 29 checks passed
@jsumners-nr jsumners-nr deleted the fix-dns-int-tests branch January 15, 2025 16:00
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.

3 participants