Fix for #17243 DockerSuite.TestExecAfterContainerRestart.

Added waitRun(containerID) statement after docker run -d and docker restart
to ensure the container is restarted before issuing a exec cmd.

Signed-off-by: Anil Belur <askb23@gmail.com>
This commit is contained in:
Anil Belur 2015-10-25 18:05:05 +05:30
Родитель 5bcd6aba4b
Коммит 2a5f04dcc9
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -82,7 +82,9 @@ func (s *DockerSuite) TestExecAfterContainerRestart(c *check.C) {
testRequires(c, DaemonIsLinux)
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
cleanedContainerID := strings.TrimSpace(out)
c.Assert(waitRun(cleanedContainerID), check.IsNil)
dockerCmd(c, "restart", cleanedContainerID)
c.Assert(waitRun(cleanedContainerID), check.IsNil)
out, _ = dockerCmd(c, "exec", cleanedContainerID, "echo", "hello")
outStr := strings.TrimSpace(out)