summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-20 18:16:52 -0500
committerGitHub <noreply@github.com>2020-02-20 18:16:52 -0500
commitbfeaabb35054119bc2ce93f09a2e3aeee43cc6df (patch)
treef97c49decb2e37b2526b0771bfa1fe0891c623c5 /test
parenta8896d5b6755be23f13f5c4cc0deb60e11155039 (diff)
parent40fa7e99317a32046fec2442b61dc524f63e52cd (diff)
downloadpodman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.tar.gz
podman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.tar.bz2
podman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.zip
Merge pull request #5222 from mheon/fix_5219
Use cleaned destination path for indexing image volumes
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_volume_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index 46c27dc2e..e31338dbc 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -15,6 +15,10 @@ import (
"github.com/onsi/gomega/gexec"
)
+var VolumeTrailingSlashDockerfile = `
+FROM alpine:latest
+VOLUME /test/`
+
var _ = Describe("Podman run with volumes", func() {
var (
tempdir string
@@ -421,4 +425,20 @@ var _ = Describe("Podman run with volumes", func() {
Expect(len(outputArr)).To(Equal(1))
Expect(strings.Contains(outputArr[0], fileName)).To(BeTrue())
})
+
+ It("Podman mount over image volume with trailing /", func() {
+ image := "podman-volume-test:trailing"
+ podmanTest.BuildImage(VolumeTrailingSlashDockerfile, image, "false")
+
+ ctrName := "testCtr"
+ create := podmanTest.Podman([]string{"create", "-v", "/tmp:/test", "--name", ctrName, image, "ls"})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ data := podmanTest.InspectContainer(ctrName)
+ Expect(len(data)).To(Equal(1))
+ Expect(len(data[0].Mounts)).To(Equal(1))
+ Expect(data[0].Mounts[0].Source).To(Equal("/tmp"))
+ Expect(data[0].Mounts[0].Destination).To(Equal("/test"))
+ })
})