mirror of
https://github.com/containers/podman.git
synced 2025-10-25 10:16:43 +08:00
sync container state before reading the healthcheck
The health check result is stored in the container state. Since the state can change or might not even be set we have to retrive the current state before we try to read the health check result. Fixes #11687 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -214,5 +214,12 @@ var _ = Describe("Podman healthcheck run", func() {
|
||||
|
||||
inspect = podmanTest.InspectContainer("hc")
|
||||
Expect(inspect[0].State.Healthcheck.Status).To(Equal(define.HealthCheckHealthy))
|
||||
|
||||
// Test podman ps --filter heath is working (#11687)
|
||||
ps := podmanTest.Podman([]string{"ps", "--filter", "health=healthy"})
|
||||
ps.WaitWithDefaultTimeout()
|
||||
Expect(ps).Should(Exit(0))
|
||||
Expect(len(ps.OutputToStringArray())).To(Equal(2))
|
||||
Expect(ps.OutputToString()).To(ContainSubstring("hc"))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user