Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 4f7dda3

Browse files
committed
Optimize TestEventsContainerFailStartDie
Optimize performance of `TestEventsContainerFailStartDie` Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
1 parent 5b0183e commit 4f7dda3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

integration-cli/docker_cli_events_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,10 @@ func (s *DockerSuite) TestEventsUntag(c *check.C) {
6666
}
6767

6868
func (s *DockerSuite) TestEventsContainerFailStartDie(c *check.C) {
69-
out, _ := dockerCmd(c, "images", "-q")
70-
image := strings.Split(out, "\n")[0]
71-
_, _, err := dockerCmdWithError("run", "--name", "testeventdie", image, "blerg")
72-
c.Assert(err, checker.NotNil, check.Commentf("Container run with command blerg should have failed, but it did not, out=%s", out))
69+
_, _, err := dockerCmdWithError("run", "--name", "testeventdie", "busybox", "blerg")
70+
c.Assert(err, checker.NotNil, check.Commentf("Container run with command blerg should have failed, but it did not"))
7371

74-
out, _ = dockerCmd(c, "events", "--since=0", fmt.Sprintf("--until=%d", daemonTime(c).Unix()))
72+
out, _ := dockerCmd(c, "events", "--since=0", fmt.Sprintf("--until=%d", daemonTime(c).Unix()))
7573
events := strings.Split(strings.TrimSpace(out), "\n")
7674

7775
nEvents := len(events)

0 commit comments

Comments
 (0)