test: Improve TestSSH/ForwardAgent stability on macOS (#5745)

This commit is contained in:
Mathias Fredriksson
2023-01-17 23:38:27 +02:00
committed by GitHub
parent 99f5f44482
commit c6fb469655
+4
View File
@@ -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