mirror of https://github.com/docker/docs.git
Update the unit test to reflect the new CmdRun behaviour in tty mode
This commit is contained in:
parent
64c1b6d9cd
commit
d063d52cce
|
@ -228,15 +228,13 @@ func TestRunDisconnectTty(t *testing.T) {
|
||||||
<-c1
|
<-c1
|
||||||
})
|
})
|
||||||
|
|
||||||
// Client disconnect after run -i should cause stdin to be closed, which should
|
// Client disconnect after run -i should keep stdin out in TTY mode
|
||||||
// cause /bin/cat to exit.
|
container := runtime.List()[0]
|
||||||
setTimeout(t, "Waiting for /bin/cat to exit timed out", 2*time.Second, func() {
|
// Give some time to monitor to do his thing
|
||||||
container := runtime.List()[0]
|
container.WaitTimeout(500 * time.Millisecond)
|
||||||
container.Wait()
|
if !container.State.Running {
|
||||||
if container.State.Running {
|
t.Fatalf("/bin/cat should still be running after closing stdin (tty mode)")
|
||||||
t.Fatalf("/bin/cat is still running after closing stdin")
|
}
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestAttachStdin checks attaching to stdin without stdout and stderr.
|
// TestAttachStdin checks attaching to stdin without stdout and stderr.
|
||||||
|
|
Loading…
Reference in New Issue