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

Skip to content

Commit ea5ab42

Browse files
committed
e tu window?
1 parent 4a0b61e commit ea5ab42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

agent/agentssh/agentssh_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,12 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
192192
}
193193
// The 60 seconds here is intended to be longer than the
194194
// test. The shutdown should propagate.
195-
err = sess.Start("/bin/bash -c 'trap \"sleep 60\" SIGTERM; echo start\"ed\"; sleep 60'")
195+
if runtime.GOOS == "windows" {
196+
// Best effort to at least partially test this in Windows.
197+
err = sess.Start("echo start\"ed\" && sleep 60")
198+
} else {
199+
err = sess.Start("/bin/bash -c 'trap \"sleep 60\" SIGTERM; echo start\"ed\"; sleep 60'")
200+
}
196201
assert.NoError(t, err)
197202

198203
pty.ExpectMatchContext(ctx, "started")

0 commit comments

Comments
 (0)