Merge pull request #9346 from jfrazelle/fix-events-test

fix tests where cmd function does not exist
This commit is contained in:
Michael Crosby 2014-11-25 18:53:08 -08:00
commit 75b47467aa
1 changed files with 8 additions and 2 deletions

View File

@ -286,8 +286,14 @@ func TestEventsImageImport(t *testing.T) {
func TestEventsFilters(t *testing.T) {
since := time.Now().Unix()
cmd(t, "run", "--rm", "busybox", "true")
cmd(t, "run", "--rm", "busybox", "true")
out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "run", "--rm", "busybox", "true"))
if err != nil {
t.Fatal(out, err)
}
out, _, err = runCommandWithOutput(exec.Command(dockerBinary, "run", "--rm", "busybox", "true"))
if err != nil {
t.Fatal(out, err)
}
eventsCmd := exec.Command(dockerBinary, "events", fmt.Sprintf("--since=%d", since), fmt.Sprintf("--until=%d", time.Now().Unix()), "--filter", "event=die")
out, exitCode, err := runCommandWithOutput(eventsCmd)
if exitCode != 0 || err != nil {