summaryrefslogtreecommitdiff
path: root/test/e2e/run_volume_test.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-05-21 10:46:40 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-21 12:36:48 -0400
commit43f28cdc166f467f3df0f553f696ecaaf0881979 (patch)
treed9cb6e89ea2c789c15770cc5767193884a5e5fed /test/e2e/run_volume_test.go
parent57e38e9550406d99dbad169d3ad4e571310e7842 (diff)
downloadpodman-43f28cdc166f467f3df0f553f696ecaaf0881979.tar.gz
podman-43f28cdc166f467f3df0f553f696ecaaf0881979.tar.bz2
podman-43f28cdc166f467f3df0f553f696ecaaf0881979.zip
Add test for image volume conflict with user volume
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/e2e/run_volume_test.go')
-rw-r--r--test/e2e/run_volume_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/run_volume_test.go b/test/e2e/run_volume_test.go
index e27b2aa55..d031ca143 100644
--- a/test/e2e/run_volume_test.go
+++ b/test/e2e/run_volume_test.go
@@ -104,4 +104,18 @@ var _ = Describe("Podman run with volumes", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(125))
})
+
+ It("podman run with conflict between image volume and user mount succeeds", func() {
+ podmanTest.RestoreArtifact(redis)
+ mountPath := filepath.Join(podmanTest.TempDir, "secrets")
+ err := os.Mkdir(mountPath, 0755)
+ Expect(err).To(BeNil())
+ testFile := filepath.Join(mountPath, "test1")
+ f, err := os.Create(testFile)
+ f.Close()
+ Expect(err).To(BeNil())
+ session := podmanTest.Podman([]string{"run", "-v", fmt.Sprintf("%s:/data", mountPath), redis, "ls", "/data/test1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})