mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #12754 from LK4D4/carry_12707
fix runtime issue for TestEventsFilterContainer
This commit is contained in:
commit
03719be830
1 changed files with 6 additions and 3 deletions
|
@ -340,12 +340,15 @@ func (s *DockerSuite) TestEventsFilterContainer(c *check.C) {
|
||||||
nameID := make(map[string]string)
|
nameID := make(map[string]string)
|
||||||
|
|
||||||
for _, name := range []string{"container_1", "container_2"} {
|
for _, name := range []string{"container_1", "container_2"} {
|
||||||
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "-d", "--name", name, "busybox", "true"))
|
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "--name", name, "busybox", "true"))
|
||||||
|
if err != nil {
|
||||||
|
c.Fatalf("Error: %v, Output: %s", err, out)
|
||||||
|
}
|
||||||
|
id, err := inspectField(name, "Id")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Fatal(err)
|
c.Fatal(err)
|
||||||
}
|
}
|
||||||
nameID[name] = strings.TrimSpace(out)
|
nameID[name] = id
|
||||||
waitInspect(name, "{{.State.Runing }}", "false", 5)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
until := fmt.Sprintf("%d", daemonTime(c).Unix())
|
until := fmt.Sprintf("%d", daemonTime(c).Unix())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue