summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-07-23 15:22:35 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-25 14:44:57 +0000
commite56717833e52db68a334018a43a0b1a698d30aa8 (patch)
tree6636e8a234681d907056e8eaf251cc718ae51ecb /test/e2e/run_test.go
parentc90b7400a8b9ffc77de69ad3aae1754ac006ba21 (diff)
downloadpodman-e56717833e52db68a334018a43a0b1a698d30aa8.tar.gz
podman-e56717833e52db68a334018a43a0b1a698d30aa8.tar.bz2
podman-e56717833e52db68a334018a43a0b1a698d30aa8.zip
Clear variables used to store options after parsing for every volume
If more than one volume was mounted using the --volume flag in podman run, the second and onwards volumes were picking up options of the previous volume mounts defined. Found out that the options were not be cleared out after every volume was parsed. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #1142 Approved by: mheon
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 32206c4f5..92aa2f191 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -547,4 +547,17 @@ USER mail`
Expect(session.OutputToString()).To(ContainSubstring("data"))
})
+
+ It("podman run --volumes flag with multiple volumes", func() {
+ vol1 := filepath.Join(podmanTest.TempDir, "vol-test1")
+ err := os.MkdirAll(vol1, 0755)
+ Expect(err).To(BeNil())
+ vol2 := filepath.Join(podmanTest.TempDir, "vol-test2")
+ err = os.MkdirAll(vol2, 0755)
+ Expect(err).To(BeNil())
+
+ session := podmanTest.Podman([]string{"run", "--volume", vol1 + ":/myvol1:ro", "--volume", vol2 + ":/myvol2", ALPINE, "touch", "/myvol2/foo.txt"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})