mirror of
https://github.com/containers/podman.git
synced 2025-06-25 12:20:42 +08:00
Merge pull request #12744 from kolyshkin/fix-flake
Fix test flake in test/e2e/pod_initcontainers
This commit is contained in:
@ -135,7 +135,7 @@ var _ = Describe("Podman init containers", func() {
|
|||||||
filename := filepath.Join("/dev/shm", RandomString(12))
|
filename := filepath.Join("/dev/shm", RandomString(12))
|
||||||
|
|
||||||
// Write the date to a file
|
// Write the date to a file
|
||||||
session := podmanTest.Podman([]string{"create", "--init-ctr", "always", "--pod", "new:foobar", ALPINE, "bin/sh", "-c", fmt.Sprintf("date > %s", filename)})
|
session := podmanTest.Podman([]string{"create", "--init-ctr", "always", "--pod", "new:foobar", fedoraMinimal, "bin/sh", "-c", "date +%T.%N > " + filename})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
verify := podmanTest.Podman([]string{"create", "--pod", "foobar", "-t", ALPINE, "top"})
|
verify := podmanTest.Podman([]string{"create", "--pod", "foobar", "-t", ALPINE, "top"})
|
||||||
|
@ -1315,7 +1315,7 @@ USER mail`, BB)
|
|||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
file.Close()
|
file.Close()
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "-dt", "--restart", "always", "-v", fmt.Sprintf("%s:/tmp/runroot:Z", testDir), ALPINE, "sh", "-c", "date +%N > /tmp/runroot/ran && while test -r /tmp/runroot/running; do sleep 0.1s; done"})
|
session := podmanTest.Podman([]string{"run", "-dt", "--restart", "always", "-v", fmt.Sprintf("%s:/tmp/runroot:Z", testDir), ALPINE, "sh", "-c", "touch /tmp/runroot/ran && while test -r /tmp/runroot/running; do sleep 0.1s; done"})
|
||||||
|
|
||||||
found := false
|
found := false
|
||||||
testFile := filepath.Join(testDir, "ran")
|
testFile := filepath.Join(testDir, "ran")
|
||||||
|
Reference in New Issue
Block a user