mirror of
https://github.com/containers/podman.git
synced 2025-10-12 00:35:05 +08:00
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
This commit is contained in:
@ -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))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user