-
Notifications
You must be signed in to change notification settings - Fork 372
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
Detect WebMock to disable telemetry and remote configuration #3065
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
anmarchenko
reviewed
Aug 22, 2023
marcotc
reviewed
Aug 25, 2023
marcotc
reviewed
Aug 25, 2023
marcotc
reviewed
Aug 25, 2023
TonyCTHsu
force-pushed
the
tonycthsu/webmock-detection
branch
from
September 1, 2023 09:19
7e000ab
to
e8eb3c6
Compare
marcotc
approved these changes
Sep 1, 2023
Codecov Report
@@ Coverage Diff @@
## master #3065 +/- ##
==========================================
- Coverage 98.15% 98.15% -0.01%
==========================================
Files 1323 1323
Lines 75089 75134 +45
Branches 3424 3424
==========================================
+ Hits 73704 73746 +42
- Misses 1385 1388 +3
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It has been reported by the community that
ddtrace
is breaking test suite withWebMock
, since some components are sending http request in the background withnet/http
.Hence this PR make an effort the detect
WebMock
to provide a better default value forddtrace
telemetry and remote configuration.WebMock
does not offer an public API such asWebMock.enabled?
to check the status. WhenWebMock.enable!
, it iterates through http adapters to enable them. The net/http adapter implements enablement by swapping the reference forNet::HTTP