test(connectivity): isolate all checker env vars in TestDetectProxyConfig - #676
Open
rrama wants to merge 1 commit into
Open
test(connectivity): isolate all checker env vars in TestDetectProxyConfig#676rrama wants to merge 1 commit into
rrama wants to merge 1 commit into
Conversation
…nfig TestDetectProxyConfig cleared only the proxy variables (HTTPS_PROXY, NO_PROXY and friends) before each case. DetectProxyConfig also reads NODE_EXTRA_CA_CERTS, KRB5_CONFIG and KRB5CCNAME, so those leaked in from the host environment. Any developer with NODE_EXTRA_CA_CERTS set (a corporate TLS-inspection CA bundle, for example) fails six of the seven subtests with a diff between "" and their own certificate path. Unsetting the variable makes the same suite pass, which is a confusing way to find out the test was never isolated. Derive the cleared list from envVarSpecs, the same list the production code iterates, so variables added there are isolated automatically instead of silently reintroducing this. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
rrama
marked this pull request as ready for review
August 3, 2026 10:08
PR Reviewer Guide 🔍
|
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.
Description
TestDetectProxyConfigclears the environment before each subtest, but only the proxy variables:DetectProxyConfigiteratesenvVarSpecs, which also coversNODE_EXTRA_CA_CERTS,KRB5_CONFIGandKRB5CCNAME. Those three were never cleared, so the host machine's environment leaked into the result.On any machine with
NODE_EXTRA_CA_CERTSset — a corporate TLS-inspection CA bundle, for instance — six of the seven subtests fail:Unsetting the variable makes the same suite pass untouched, which is a confusing way to discover the test was never isolated. CI does not set these variables, which is why this has gone unnoticed.
The cleared list is now derived from
envVarSpecsitself, so a variable added to the production spec is isolated automatically rather than quietly reintroducing this. It also removes the duplicated list of variable names.Found while running the full suite to validate an unrelated change (#673).
Checklist
make test) —connectivity_check_extension/...passes withNODE_EXTRA_CA_CERTSstill set in my shell, which reproduced the failure before this changemake generate) — n/amake lint) — 0 issuesMade with Cursor