diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-10 11:58:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-10 11:58:08 -0800 |
commit | 7d2632872a875ad0baca0f812e0f8d9d97617977 (patch) | |
tree | 8e277ff486162ec0c1d0b24e224e3ffee48fdcb3 /test | |
parent | 4fb60450878127f0d8e5c240075d25bd49b91433 (diff) | |
parent | f2ff550967660a611f8f28e9bd79d39bc007c104 (diff) | |
download | podman-7d2632872a875ad0baca0f812e0f8d9d97617977.tar.gz podman-7d2632872a875ad0baca0f812e0f8d9d97617977.tar.bz2 podman-7d2632872a875ad0baca0f812e0f8d9d97617977.zip |
Merge pull request #2120 from rhatdan/volume
Fix handling of nil volumes
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go index a0b16a254..1e7f4f0f4 100644 --- a/test/e2e/run_test.go +++ b/test/e2e/run_test.go @@ -596,6 +596,21 @@ USER mail` Expect(session.ExitCode()).To(Equal(0)) }) + It("podman run --volumes flag with empty host dir", func() { + vol1 := filepath.Join(podmanTest.TempDir, "vol-test1") + err := os.MkdirAll(vol1, 0755) + Expect(err).To(BeNil()) + + session := podmanTest.Podman([]string{"run", "--volume", ":/myvol1:z", ALPINE, "touch", "/myvol2/foo.txt"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("directory cannot be empty")) + session = podmanTest.Podman([]string{"run", "--volume", vol1 + ":", ALPINE, "touch", "/myvol2/foo.txt"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).ToNot(Equal(0)) + Expect(session.ErrorToString()).To(ContainSubstring("directory cannot be empty")) + }) + It("podman run --mount flag with multiple mounts", func() { vol1 := filepath.Join(podmanTest.TempDir, "vol-test1") err := os.MkdirAll(vol1, 0755) |