test(device ssh): unset proxy env vars that break stderr assertions#3088
Merged
flowzone-app[bot] merged 1 commit intomasterfrom Apr 8, 2026
Merged
test(device ssh): unset proxy env vars that break stderr assertions#3088flowzone-app[bot] merged 1 commit intomasterfrom
flowzone-app[bot] merged 1 commit intomasterfrom
Conversation
eed53e5 to
521fe76
Compare
521fe76 to
e40731e
Compare
npm security wrappers may inject HTTPS_PROXY into the process environment, causing getProxyConfig() to detect a proxy and emit a proxytunnel warning on stderr. These tests use mocked SSH and don't need proxying, so save and unset HTTPS_PROXY and HTTP_PROXY in beforeEach, restoring them in afterEach. Change-type: patch Signed-off-by: Kyle Harding <kyle@balena.io>
e40731e to
a97edb0
Compare
aethernet
approved these changes
Apr 8, 2026
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.
device sshtests assert stderr is empty, but environments with npm security wrappers may injectHTTPS_PROXY, causinggetProxyConfig()to detect a proxy and emit aproxytunnelwarning that fails the assertionUnset
HTTPS_PROXYandHTTP_PROXYinbeforeEachand restore inafterEachso the warnings are never emitted — keepsexpect(err).to.be.emptyas a strict assertionSee: https://balena.fibery.io/Work/Improvement/Update-balena-CLI-ssh-tests-to-unset-HTTPS_PROXY-4043