summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-05-30 16:48:10 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-05-30 18:10:28 +0200
commitec576a54917d902df0de2daa1935ca22b102a2b9 (patch)
tree262c83c92f67862c6e68564d7c8a9ead7561f0c7 /test/e2e
parenta550af260a536aeaa35e4b8810971748a6f16f5f (diff)
downloadpodman-ec576a54917d902df0de2daa1935ca22b102a2b9.tar.gz
podman-ec576a54917d902df0de2daa1935ca22b102a2b9.tar.bz2
podman-ec576a54917d902df0de2daa1935ca22b102a2b9.zip
podman volume export/import: give better error
When the volume does not exist we should output an error stating so and not some generic one. Fixes #14411 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/volume_create_test.go17
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() {