1
0
mirror of https://github.com/moby/moby.git synced 2025-10-24 09:13:09 +03:00

Use waitRun in TestDockerNetworkHostModeUngracefulDaemonRestart

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal
2016-02-03 13:03:32 -08:00
parent b2c162a0b3
commit 76a765140e
2 changed files with 15 additions and 5 deletions

View File

@@ -1017,14 +1017,14 @@ func (s *DockerNetworkSuite) TestDockerNetworkHostModeUngracefulDaemonRestart(c
if err := s.d.cmd.Process.Kill(); err != nil {
c.Fatal(err)
}
s.d.Restart()
if err := s.d.Restart(); err != nil {
c.Fatal(err)
}
// make sure all the containers are up and running
for i := 0; i < 10; i++ {
cName := fmt.Sprintf("hostc-%d", i)
runningOut, err := s.d.Cmd("inspect", "--format='{{.State.Running}}'", cName)
err := s.d.waitRun(fmt.Sprintf("hostc-%d", i))
c.Assert(err, checker.IsNil)
c.Assert(strings.TrimSpace(runningOut), checker.Equals, "true")
}
}