aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2022-09-14 13:01:43 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2022-09-14 17:09:04 +0200
commit14e5d1c15da82f7eb315c320765aeca69f4b58af (patch)
tree4d1b162552e80c1c5a267110310dfc2bc1638679 /test
parent92dc61d5edb1b5ce85f7e4563d400cc861a28359 (diff)
downloadpodman-14e5d1c15da82f7eb315c320765aeca69f4b58af.tar.gz
podman-14e5d1c15da82f7eb315c320765aeca69f4b58af.tar.bz2
podman-14e5d1c15da82f7eb315c320765aeca69f4b58af.zip
libpod: fix lookup for subpath in volumes
a subdirectory that is below a mount destination is detected as a subpath. Closes: https://github.com/containers/podman/issues/15789 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_working_dir_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/run_working_dir_test.go b/test/e2e/run_working_dir_test.go
index ff91a420f..84792481f 100644
--- a/test/e2e/run_working_dir_test.go
+++ b/test/e2e/run_working_dir_test.go
@@ -46,6 +46,15 @@ var _ = Describe("Podman run", func() {
Expect(session).Should(Exit(126))
})
+ It("podman run a container using a --workdir under a bind mount", func() {
+ volume, err := CreateTempDirInTempDir()
+ Expect(err).To(BeNil())
+
+ session := podmanTest.Podman([]string{"run", "--volume", fmt.Sprintf("%s:/var_ovl/:O", volume), "--workdir", "/var_ovl/log", ALPINE, "true"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ })
+
It("podman run a container on an image with a workdir", func() {
dockerfile := fmt.Sprintf(`FROM %s
RUN mkdir -p /home/foobar /etc/foobar; chown bin:bin /etc/foobar