diff --git a/cli/ssh_test.go b/cli/ssh_test.go index dc09e0d84f45a..137851d437b35 100644 --- a/cli/ssh_test.go +++ b/cli/ssh_test.go @@ -274,6 +274,10 @@ func TestSSH(t *testing.T) { assert.NoError(t, err, "ssh command failed") }) + // Wait for the prompt or any output really to indicate the command has + // started and accepting input on stdin. + _ = pty.Peek(ctx, 1) + // Ensure that SSH_AUTH_SOCK is set. // Linux: /tmp/auth-agent3167016167/listener.sock // macOS: /var/folders/ng/m1q0wft14hj0t3rtjxrdnzsr0000gn/T/auth-agent3245553419/listener.sock