summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAvery Pennarun <apenwarr@tailscale.com>2026-04-13 03:52:09 +0200
committerBrad Fitzpatrick <brad@danga.com>2026-04-13 18:53:07 -0700
commitab74ea0a67cb874684f6fca28c4293a5b5dde35b (patch)
treef55d7fb055c9ecaddfc077cfd6dd6d3e826aaf8f
parent9fbe4b3ed28cd68be6d25b6824bd638ab14b292e (diff)
downloadtailscale-ab74ea0a67cb874684f6fca28c4293a5b5dde35b.tar.xz
tailscale-ab74ea0a67cb874684f6fca28c4293a5b5dde35b.zip
tstest/integration: clear SSH_CLIENT env to prevent false positive detection
When running integration tests over SSH (e.g., in remote development environments), the SSH_CLIENT environment variable is set. This causes isSSHOverTailscale() to incorrectly detect an SSH session and change behavior. Clear SSH_CLIENT in the test node environment to prevent these false positives. Fixes #19393 Change-Id: I1411abf0be9704cce37051476efb04d59beed386 Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
-rw-r--r--tstest/integration/integration.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/tstest/integration/integration.go b/tstest/integration/integration.go
index a98df8180..f4bf9ebdd 100644
--- a/tstest/integration/integration.go
+++ b/tstest/integration/integration.go
@@ -1044,6 +1044,9 @@ func (n *TestNode) Tailscale(arg ...string) *exec.Cmd {
cmd.Env = append(os.Environ(),
"TS_DEBUG_UP_FLAG_GOOS="+n.upFlagGOOS,
"TS_LOGS_DIR="+n.env.t.TempDir(),
+ "SSH_CLIENT=", // Clear SSH_CLIENT to prevent isSSHOverTailscale() false positives in tests
+ "SSH_CONNECTION=", // just in case
+ "SSH_AUTH_SOCK=", // just in case
)
if *verboseTailscale {
cmd.Stdout = os.Stdout