mirror of
https://github.com/containers/podman.git
synced 2025-06-01 17:17:47 +08:00
Merge pull request #3249 from baude/testtiming
fix timing issues with some tests
This commit is contained in:
@ -5,6 +5,7 @@ package integration
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
. "github.com/containers/libpod/test/utils"
|
. "github.com/containers/libpod/test/utils"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
@ -47,9 +48,19 @@ var _ = Describe("Podman healthcheck run", func() {
|
|||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
|
||||||
hc := podmanTest.Podman([]string{"healthcheck", "run", "hc"})
|
exitCode := 999
|
||||||
hc.WaitWithDefaultTimeout()
|
|
||||||
Expect(hc.ExitCode()).To(Equal(0))
|
// Buy a little time to get container running
|
||||||
|
for i := 0; i < 5; i++ {
|
||||||
|
hc := podmanTest.Podman([]string{"healthcheck", "run", "hc"})
|
||||||
|
hc.WaitWithDefaultTimeout()
|
||||||
|
exitCode = hc.ExitCode()
|
||||||
|
if exitCode == 0 || i == 4 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
}
|
||||||
|
Expect(exitCode).To(Equal(0))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman healthcheck that should fail", func() {
|
It("podman healthcheck that should fail", func() {
|
||||||
|
Reference in New Issue
Block a user