From 040cde7cfb3aec52a856ea88e2ec87db1179477f Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Mon, 13 Jan 2025 09:05:01 +0000 Subject: [PATCH] fix: use `netstat` over `ss` when testing unix socket --- cli/ssh_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli/ssh_test.go b/cli/ssh_test.go index 4fd52971df1cf..8006297f0c3e1 100644 --- a/cli/ssh_test.go +++ b/cli/ssh_test.go @@ -1146,9 +1146,8 @@ func TestSSH(t *testing.T) { // started and accepting input on stdin. _ = pty.Peek(ctx, 1) - // Download the test page - pty.WriteLine(fmt.Sprintf("ss -xl state listening src %s | wc -l", remoteSock)) - pty.ExpectMatch("2") + pty.WriteLine(fmt.Sprintf("netstat -an | grep -q %s; echo \"returned $?\"", remoteSock)) + pty.ExpectMatchContext(ctx, "returned 0") // And we're done. pty.WriteLine("exit")