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

Commit e5b5c0e

Browse files
committed
Merge pull request #19713 from WeiZhang555/opt-TestEventsContainerFailStartDie
Optimize `TestEventsContainerFailStartDie`
2 parents 141a301 + 4f7dda3 commit e5b5c0e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

integration-cli/docker_cli_events_test.go

+3-5
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)