summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorflouthoc <flouthoc.git@gmail.com>2021-08-20 14:22:54 +0530
committerflouthoc <flouthoc.git@gmail.com>2021-08-23 20:42:41 +0530
commitedddfe8c4f7761b12dc64ea4aa0a83b755aa124f (patch)
tree4eb4323903b3aec46fd5da3dd7152c24d88045d0 /test/e2e
parent30b036c5d394bb523fa13074b1731ad4b6259693 (diff)
downloadpodman-edddfe8c4f7761b12dc64ea4aa0a83b755aa124f.tar.gz
podman-edddfe8c4f7761b12dc64ea4aa0a83b755aa124f.tar.bz2
podman-edddfe8c4f7761b12dc64ea4aa0a83b755aa124f.zip
volumes: Add support for exporting volumes to external tar
Adds support for transferring data between systems and backing up systems. Use cases: recover from disasters or move data between machines. Signed-off-by: flouthoc <flouthoc.git@gmail.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/volume_create_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/volume_create_test.go b/test/e2e/volume_create_test.go
index 51005d177..d9c805f46 100644
--- a/test/e2e/volume_create_test.go
+++ b/test/e2e/volume_create_test.go
@@ -60,6 +60,25 @@ var _ = Describe("Podman volume create", func() {
Expect(len(check.OutputToStringArray())).To(Equal(1))
})
+ It("podman create and export volume", func() {
+ if podmanTest.RemoteTest {
+ Skip("Volume export check does not work with a remote client")
+ }
+
+ session := podmanTest.Podman([]string{"volume", "create", "myvol"})
+ session.WaitWithDefaultTimeout()
+ volName := session.OutputToString()
+ Expect(session).Should(Exit(0))
+
+ session = podmanTest.Podman([]string{"run", "--volume", volName + ":/data", ALPINE, "sh", "-c", "echo hello >> " + "/data/test"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ check := podmanTest.Podman([]string{"volume", "export", volName})
+ check.WaitWithDefaultTimeout()
+ Expect(check.OutputToString()).To(ContainSubstring("hello"))
+ })
+
It("podman create volume with bad volume option", func() {
session := podmanTest.Podman([]string{"volume", "create", "--opt", "badOpt=bad"})
session.WaitWithDefaultTimeout()