The test was waiting for the container to exit after failing its
healthcheck. However, we no longer automatically terminate containers,
so this waited instead for the container to time-out by itself.
Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
(cherry picked from commit 18a59bb8691c6f6f6a7a86f56bbcfc5418509ed8)
| ... | ... |
@@ -127,12 +127,10 @@ func (s *DockerSuite) TestHealth(c *check.C) {
|
| 127 | 127 |
c.Check(last.ExitCode, checker.Equals, 0) |
| 128 | 128 |
c.Check(last.Output, checker.Equals, "OK\n") |
| 129 | 129 |
|
| 130 |
- // Fail the check, which should now make it exit |
|
| 130 |
+ // Fail the check |
|
| 131 | 131 |
dockerCmd(c, "exec", "fatal_healthcheck", "rm", "/status") |
| 132 |
- waitForStatus(c, "fatal_healthcheck", "running", "exited") |
|
| 132 |
+ waitForHealthStatus(c, "fatal_healthcheck", "healthy", "unhealthy") |
|
| 133 | 133 |
|
| 134 |
- out, _ = dockerCmd(c, "inspect", "--format={{.State.Health.Status}}", "fatal_healthcheck")
|
|
| 135 |
- c.Check(out, checker.Equals, "unhealthy\n") |
|
| 136 | 134 |
failsStr, _ := dockerCmd(c, "inspect", "--format={{.State.Health.FailingStreak}}", "fatal_healthcheck")
|
| 137 | 135 |
fails, err := strconv.Atoi(strings.TrimSpace(failsStr)) |
| 138 | 136 |
c.Check(err, check.IsNil) |