1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00

Merge pull request #14722 from duglin/FixInspectExecIDTest

Move inspect into the loop on InspectExecID test
Upstream-commit: a0a0b8499e068c5c9a4caf5bab83d39ddd362078
Component: engine
This commit is contained in:
Alexander Morozov
2015-07-17 18:21:49 -07:00

View File

@@ -436,15 +436,15 @@ func (s *DockerSuite) TestInspectExecID(c *check.C) {
c.Fatalf("failed to start the exec cmd: %q", err)
}
// Since its still running we should see the exec as part of the container
out, err = inspectField(id, "ExecIDs")
if err != nil {
c.Fatalf("failed to inspect container: %s, %v", out, err)
}
// Give the exec 10 chances/seconds to start then give up and stop the test
tries := 10
for i := 0; i < tries; i++ {
// Since its still running we should see exec as part of the container
out, err = inspectField(id, "ExecIDs")
if err != nil {
c.Fatalf("failed to inspect container: %s, %v", out, err)
}
out = strings.TrimSuffix(out, "\n")
if out != "[]" && out != "<no value>" {
break