summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-07-01 13:49:28 +0530
committerAditya R <arajan@redhat.com>2022-07-01 14:19:01 +0530
commitd6678adc92b77db13db557a0381beff1c7da8549 (patch)
tree9b555a4a21b8c8d13f24ca75a1ed18fe32b56a14 /test/e2e
parent01beba3667851c1dd68d3df1e0aa6bc8cb1ec0eb (diff)
downloadpodman-d6678adc92b77db13db557a0381beff1c7da8549.tar.gz
podman-d6678adc92b77db13db557a0381beff1c7da8549.tar.bz2
podman-d6678adc92b77db13db557a0381beff1c7da8549.zip
overlay,mount: convert lowerdir to absolute path for overlay mounts of path
When mounting paths as overlay mounts we end up passing source as is to lowerdir options, resolve all relative paths in such cases for overlay mounts. Closes: https://github.com/containers/podman/issues/14797 Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_volume_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 8cc2a68de..5fcf340d4 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -678,6 +678,15 @@ VOLUME /test/`, ALPINE)
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
+ // Test overlay mount when lowerdir is relative path.
+ f, err = os.Create("hello")
+ Expect(err).To(BeNil(), "os.Create")
+ f.Close()
+ session = podmanTest.Podman([]string{"run", "--rm", "-v", ".:/app:O", ALPINE, "ls", "/app"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.OutputToString()).To(ContainSubstring("hello"))
+ Expect(session).Should(Exit(0))
+
// Make sure modifications in container do not show up on host
session = podmanTest.Podman([]string{"run", "--rm", "-v", volumeFlag, ALPINE, "touch", "/run/test/container"})
session.WaitWithDefaultTimeout()