Migrate squid tests to mock_http fixture#23555
Merged
mwdd146980 merged 1 commit intomwdd146980/httpx-migration-basefrom May 1, 2026
Merged
Migrate squid tests to mock_http fixture#23555mwdd146980 merged 1 commit intomwdd146980/httpx-migration-basefrom
mwdd146980 merged 1 commit intomwdd146980/httpx-migration-basefrom
Conversation
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 2dd0b0c | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
iliakur
approved these changes
May 1, 2026
Base automatically changed from
mwdd146980/step4-conftest-session-patches
to
mwdd146980/httpx-migration-base
May 1, 2026 15:59
a28e108 to
2dd0b0c
Compare
Contributor
Validation ReportAll 20 validations passed. Show details
|
justin-lesko
approved these changes
May 1, 2026
faddc6c
into
mwdd146980/httpx-migration-base
23 of 27 checks passed
This file contains hidden or 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
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.
Motivation
Test fixtures patching
requests.Session.getwill silently break when squid switches fromrequeststohttpx. Migrate tomock_httpfixture +MockHTTPResponseso tests are transport-agnostic.Approach
mock.patch('datadog_checks.squid.squid.requests.Session.get')withmock_httpfixture intest_unit.py(3 tests).mock.patch('datadog_checks.base.utils.http.requests.Session.get')withmock_httpfixture intest_squid.py::test_version_metadata.Verification
All unit tests pass.
dd_environment-gated tests fail at fixture setup due to local Docker image pull (pre-existing, unrelated to this change).