summaryrefslogtreecommitdiff
path: root/integration
diff options
context:
space:
mode:
authorSebastiaan van Stijn <thaJeztah@users.noreply.github.com>2022-09-02 10:48:22 +0200
committerGitHub <noreply@github.com>2022-09-02 10:48:22 +0200
commit067062129171dba592638e8e3a0efbfa8a71376b (patch)
treed238954a1d8da098fbc17a5c11f473a27ac77197 /integration
parentc9c55df1f25a10ff509ad4d56fd87f0172dee7a8 (diff)
parent0cbb92bcc543767e5abe6f912ea797166fe25cba (diff)
downloaddocker-067062129171dba592638e8e3a0efbfa8a71376b.tar.gz
Merge pull request #43997 from thaJeztah/healthcheck_capture_logs
daemon: capture output of killed health checks
Diffstat (limited to 'integration')
-rw-r--r--integration/container/health_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/integration/container/health_test.go b/integration/container/health_test.go
index debd5b96f1..30cd2b8442 100644
--- a/integration/container/health_test.go
+++ b/integration/container/health_test.go
@@ -102,13 +102,13 @@ func TestHealthCheckProcessKilled(t *testing.T) {
cID := container.Run(ctx, t, apiClient, func(c *container.TestContainerConfig) {
c.Config.Healthcheck = &containertypes.HealthConfig{
- Test: []string{"CMD", "sh", "-c", "sleep 60"},
+ Test: []string{"CMD", "sh", "-c", `echo "logs logs logs"; sleep 60`},
Interval: 100 * time.Millisecond,
Timeout: 50 * time.Millisecond,
Retries: 1,
}
})
- poll.WaitOn(t, pollForHealthCheckLog(ctx, apiClient, cID, "Health check exceeded timeout (50ms)"))
+ poll.WaitOn(t, pollForHealthCheckLog(ctx, apiClient, cID, "Health check exceeded timeout (50ms): logs logs logs\n"))
}
func pollForHealthCheckLog(ctx context.Context, client client.APIClient, containerID string, expected string) func(log poll.LogT) poll.Result {