Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c6fb469

Browse files
authored
test: Improve TestSSH/ForwardAgent stability on macOS (#5745)
1 parent 99f5f44 commit c6fb469

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/ssh_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ func TestSSH(t *testing.T) {
274274
assert.NoError(t, err, "ssh command failed")
275275
})
276276

277+
// Wait for the prompt or any output really to indicate the command has
278+
// started and accepting input on stdin.
279+
_ = pty.Peek(ctx, 1)
280+
277281
// Ensure that SSH_AUTH_SOCK is set.
278282
// Linux: /tmp/auth-agent3167016167/listener.sock
279283
// macOS: /var/folders/ng/m1q0wft14hj0t3rtjxrdnzsr0000gn/T/auth-agent3245553419/listener.sock

0 commit comments

Comments
 (0)