diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-05-31 09:27:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 09:27:29 -0400 |
commit | dc67e6a182a09c8b65ef139fb9f15ddfdecae70f (patch) | |
tree | 8c6cc25dc87deabefe4f89fc2a4d24b14706119c /test | |
parent | ccc087a30e7f84d656663e0b60cd2b918f5288fd (diff) | |
parent | ec576a54917d902df0de2daa1935ca22b102a2b9 (diff) | |
download | podman-dc67e6a182a09c8b65ef139fb9f15ddfdecae70f.tar.gz podman-dc67e6a182a09c8b65ef139fb9f15ddfdecae70f.tar.bz2 podman-dc67e6a182a09c8b65ef139fb9f15ddfdecae70f.zip |
Merge pull request #14419 from Luap99/volume-import
podman volume export/import: give better error
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/volume_create_test.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/test/e2e/volume_create_test.go b/test/e2e/volume_create_test.go index 0bf5acbf1..499283cab 100644 --- a/test/e2e/volume_create_test.go +++ b/test/e2e/volume_create_test.go @@ -110,15 +110,24 @@ var _ = Describe("Podman volume create", func() { Expect(session.OutputToString()).To(ContainSubstring("hello")) }) - It("podman import volume should fail", func() { + It("podman import/export volume should fail", func() { // try import on volume or source which does not exists - if podmanTest.RemoteTest { - Skip("Volume export check does not work with a remote client") - } + SkipIfRemote("Volume export check does not work with a remote client") session := podmanTest.Podman([]string{"volume", "import", "notfound", "notfound.tar"}) session.WaitWithDefaultTimeout() Expect(session).To(ExitWithError()) + Expect(session.ErrorToString()).To(ContainSubstring("open notfound.tar: no such file or directory")) + + session = podmanTest.Podman([]string{"volume", "import", "notfound", "-"}) + session.WaitWithDefaultTimeout() + Expect(session).To(ExitWithError()) + Expect(session.ErrorToString()).To(ContainSubstring("no such volume notfound")) + + session = podmanTest.Podman([]string{"volume", "export", "notfound"}) + session.WaitWithDefaultTimeout() + Expect(session).To(ExitWithError()) + Expect(session.ErrorToString()).To(ContainSubstring("no such volume notfound")) }) It("podman create volume with bad volume option", func() { |