mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
tests: do not make assumptions on the mount output
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -218,7 +218,11 @@ var _ = Describe("Podman run", func() {
|
|||||||
session = podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,shared", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"})
|
session = podmanTest.Podman([]string{"run", "--rm", "--mount", fmt.Sprintf("type=bind,src=%s,target=/run/test,shared", mountPath), ALPINE, "grep", "/run/test", "/proc/self/mountinfo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
Expect(session.OutputToString()).To(ContainSubstring("/run/test rw,relatime shared"))
|
found, matches := session.GrepString("/run/test")
|
||||||
|
Expect(found).Should(BeTrue())
|
||||||
|
Expect(matches[0]).To(ContainSubstring("rw"))
|
||||||
|
Expect(matches[0]).To(ContainSubstring("relatime"))
|
||||||
|
Expect(matches[0]).To(ContainSubstring("shared"))
|
||||||
|
|
||||||
mountPath = filepath.Join(podmanTest.TempDir, "scratchpad")
|
mountPath = filepath.Join(podmanTest.TempDir, "scratchpad")
|
||||||
os.Mkdir(mountPath, 0755)
|
os.Mkdir(mountPath, 0755)
|
||||||
|
Reference in New Issue
Block a user