Optimize `TestEventsContainerFailStartDie`
| ... | ... |
@@ -66,12 +66,10 @@ func (s *DockerSuite) TestEventsUntag(c *check.C) {
|
| 66 | 66 |
} |
| 67 | 67 |
|
| 68 | 68 |
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"))
|
|
| 73 | 71 |
|
| 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()))
|
|
| 75 | 73 |
events := strings.Split(strings.TrimSpace(out), "\n") |
| 76 | 74 |
|
| 77 | 75 |
nEvents := len(events) |