Merge pull request #15166 from sstosh/ci-mount-rootless

Cirrus: Fix e2e tests for "mount_rootless_test"
This commit is contained in:
openshift-ci[bot] 2022-08-03 13:55:25 +00:00 committed by GitHub
commit e54dac4dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 4 deletions

View File

@ -52,9 +52,16 @@ var _ = Describe("Podman mount", func() {
Expect(setup).Should(Exit(0))
cid := setup.OutputToString()
session := podmanTest.Podman([]string{"unshare", PODMAN_BINARY, "mount", cid})
// command: podman <options> unshare podman <options> mount cid
args := []string{"unshare", podmanTest.PodmanBinary}
opts := podmanTest.PodmanMakeOptions([]string{"mount", cid}, false, false)
args = append(args, opts...)
// container root file system location is /tmp/... because "--root /tmp/..."
session := podmanTest.Podman(args)
session.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(ContainSubstring("/tmp"))
})
It("podman image mount", func() {
@ -71,8 +78,15 @@ var _ = Describe("Podman mount", func() {
setup.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
session := podmanTest.Podman([]string{"unshare", PODMAN_BINARY, "image", "mount", ALPINE})
// command: podman <options> unshare podman <options> image mount ALPINE
args := []string{"unshare", podmanTest.PodmanBinary}
opts := podmanTest.PodmanMakeOptions([]string{"image", "mount", ALPINE}, false, false)
args = append(args, opts...)
// image location is /tmp/... because "--root /tmp/..."
session := podmanTest.Podman(args)
session.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(ContainSubstring("/tmp"))
})
})