Signed-off-by: Oleksandr Krutko <alexander.krutko@gmail.com>
This commit is contained in:
Oleksandr Krutko
2025-08-02 22:57:23 +03:00
parent 0c4c9e4fbc
commit a75f74b1d3
6 changed files with 97 additions and 0 deletions

View File

@ -123,4 +123,16 @@ var _ = Describe("Podman wait", func() {
Expect(session).Should(ExitCleanly())
Expect(session.OutputToString()).To(Equal("-1"))
})
It("podman wait for first return container", func() {
session1 := podmanTest.PodmanExitCleanly("run", "-d", ALPINE, "sh", "-c", "sleep 100; exit 1")
cid1 := session1.OutputToString()
session2 := podmanTest.PodmanExitCleanly("run", "-d", ALPINE, "sh", "-c", "sleep 3; exit 2")
cid2 := session2.OutputToString()
waitSession := podmanTest.PodmanExitCleanly("wait", "--exit-first-match", "--condition", "exited", cid1, cid2)
waitSession.Wait(10)
Expect(waitSession.OutputToString()).To(Equal("2"))
})
})