Skip to content

Commit 87b4f84

Browse files
committed
test: fix "run healthcheck" bindings test
Signed-off-by: ByoungUk Lee <[email protected]>
1 parent 0742349 commit 87b4f84

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

pkg/bindings/test/containers_test.go

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -330,22 +330,9 @@ var _ = Describe("Podman containers ", func() {
330330
code, _ = bindings.CheckResponseCode(err)
331331
Expect(code).To(BeNumerically("==", http.StatusConflict))
332332

333-
// TODO for the life of me, i cannot get this to work. maybe another set
334-
// of eyes will
335-
// successful healthcheck
336-
// status := define.HealthCheckHealthy
337-
// for i:=0; i < 10; i++ {
338-
// result, err := containers.RunHealthCheck(connText, "hc")
339-
// Expect(err).To(BeNil())
340-
// if result.Status != define.HealthCheckHealthy {
341-
// fmt.Println("Healthcheck container still starting, retrying in 1 second")
342-
// time.Sleep(1 * time.Second)
343-
// continue
344-
// }
345-
// status = result.Status
346-
// break
347-
// }
348-
// Expect(status).To(Equal(define.HealthCheckHealthy))
333+
result, err := containers.RunHealthCheck(bt.conn, "hc", nil)
334+
Expect(err).ToNot(HaveOccurred())
335+
Expect(result.Status).To(Equal(define.HealthCheckHealthy))
349336

350337
// TODO enable this when wait is working
351338
// healthcheck on a stopped container should be a 409

0 commit comments

Comments
 (0)