diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-30 18:12:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-30 18:12:29 -0400 |
commit | 95ac8f180f26d7ed4cf2945aa206a156b7a169ca (patch) | |
tree | 4e428c0ca8beab10224e9d959aab62d6f6516928 /test | |
parent | c97666723104fde9886ba789fe4ac34a4294981b (diff) | |
parent | ec1f350ee5a3776f6fac6e96e1277d0ab36d130a (diff) | |
download | podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.tar.gz podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.tar.bz2 podman-95ac8f180f26d7ed4cf2945aa206a156b7a169ca.zip |
Merge pull request #11353 from flouthoc/resolve-workdir-after-mounts
container: resolve workdir during initialization after all the mounts are completed.
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_volume_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go index d1f6ea80e..59937b6c0 100644 --- a/test/e2e/run_volume_test.go +++ b/test/e2e/run_volume_test.go @@ -222,6 +222,26 @@ var _ = Describe("Podman run with volumes", func() { Expect(matches[0]).To(Not(ContainSubstring("nosuid"))) }) + // Container should start when workdir is overlayed volume + It("podman run with volume mounted as overlay and used as workdir", func() { + SkipIfRemote("Overlay volumes only work locally") + if os.Getenv("container") != "" { + Skip("Overlay mounts not supported when running in a container") + } + if rootless.IsRootless() { + if _, err := exec.LookPath("fuse-overlayfs"); err != nil { + Skip("Fuse-Overlayfs required for rootless overlay mount test") + } + } + mountPath := filepath.Join(podmanTest.TempDir, "secrets") + os.Mkdir(mountPath, 0755) + + //Container should be able to start with custom overlayed volume + session := podmanTest.Podman([]string{"run", "--rm", "-v", mountPath + ":/data:O", "--workdir=/data", ALPINE, "echo", "hello"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + }) + It("podman run with noexec can't exec", func() { session := podmanTest.Podman([]string{"run", "--rm", "-v", "/bin:/hostbin:noexec", ALPINE, "/hostbin/ls", "/"}) session.WaitWithDefaultTimeout() |