From 87b4f842de2b0c1725e228c7cb04186259737dac Mon Sep 17 00:00:00 2001 From: ByoungUk Lee Date: Tue, 30 Sep 2025 22:53:22 +0900 Subject: [PATCH] test: fix "run healthcheck" bindings test Signed-off-by: ByoungUk Lee --- pkg/bindings/test/containers_test.go | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go index 9de2f518d4..95739e1958 100644 --- a/pkg/bindings/test/containers_test.go +++ b/pkg/bindings/test/containers_test.go @@ -330,22 +330,9 @@ var _ = Describe("Podman containers ", func() { code, _ = bindings.CheckResponseCode(err) Expect(code).To(BeNumerically("==", http.StatusConflict)) - // TODO for the life of me, i cannot get this to work. maybe another set - // of eyes will - // successful healthcheck - // status := define.HealthCheckHealthy - // for i:=0; i < 10; i++ { - // result, err := containers.RunHealthCheck(connText, "hc") - // Expect(err).To(BeNil()) - // if result.Status != define.HealthCheckHealthy { - // fmt.Println("Healthcheck container still starting, retrying in 1 second") - // time.Sleep(1 * time.Second) - // continue - // } - // status = result.Status - // break - // } - // Expect(status).To(Equal(define.HealthCheckHealthy)) + result, err := containers.RunHealthCheck(bt.conn, "hc", nil) + Expect(err).ToNot(HaveOccurred()) + Expect(result.Status).To(Equal(define.HealthCheckHealthy)) // TODO enable this when wait is working // healthcheck on a stopped container should be a 409