Skip to content

Commit 040cde7

Browse files
committed
fix: use netstat over ss when testing unix socket
1 parent 88a9c4b commit 040cde7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cli/ssh_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,9 +1146,8 @@ func TestSSH(t *testing.T) {
11461146
// started and accepting input on stdin.
11471147
_ = pty.Peek(ctx, 1)
11481148

1149-
// Download the test page
1150-
pty.WriteLine(fmt.Sprintf("ss -xl state listening src %s | wc -l", remoteSock))
1151-
pty.ExpectMatch("2")
1149+
pty.WriteLine(fmt.Sprintf("netstat -an | grep -q %s; echo \"returned $?\"", remoteSock))
1150+
pty.ExpectMatchContext(ctx, "returned 0")
11521151

11531152
// And we're done.
11541153
pty.WriteLine("exit")

0 commit comments

Comments
 (0)