Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a0b61e commit ea5ab42Copy full SHA for ea5ab42
agent/agentssh/agentssh_test.go
@@ -192,7 +192,12 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
192
}
193
// The 60 seconds here is intended to be longer than the
194
// test. The shutdown should propagate.
195
- err = sess.Start("/bin/bash -c 'trap \"sleep 60\" SIGTERM; echo start\"ed\"; sleep 60'")
+ 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
+ }
201
assert.NoError(t, err)
202
203
pty.ExpectMatchContext(ctx, "started")
0 commit comments