summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-23 14:01:20 -0400
committerGitHub <noreply@github.com>2021-08-23 14:01:20 -0400
commit90cf78b199772082025f22e4ebc0e30c133d2a88 (patch)
treee890e717d5b5ce7bc51821776607464a7759271d /test/e2e
parent6a3741598cc30216a1a8db7d2c917e19bc37002b (diff)
parentedddfe8c4f7761b12dc64ea4aa0a83b755aa124f (diff)
downloadpodman-90cf78b199772082025f22e4ebc0e30c133d2a88.tar.gz
podman-90cf78b199772082025f22e4ebc0e30c133d2a88.tar.bz2
podman-90cf78b199772082025f22e4ebc0e30c133d2a88.zip
Merge pull request #11290 from flouthoc/volume-export
volumes: Add support for `volume export` which allows exporting content to external path.
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()