summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-07-23 11:46:43 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-30 16:56:11 +0000
commit49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8 (patch)
tree7399eb7367cf7965689224922e5a967c3fd7e6dc /test
parent49b3647410474cfc2d5010c6c329e6673fc02fe4 (diff)
downloadpodman-49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8.tar.gz
podman-49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8.tar.bz2
podman-49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8.zip
Add load test for xz compressed images
The auto decompression functionality was already vendored in with containers/image. Adding a test for it. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #1137 Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r--test/e2e/load_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go
index fa74c45b6..8ea4440ba 100644
--- a/test/e2e/load_test.go
+++ b/test/e2e/load_test.go
@@ -217,4 +217,23 @@ var _ = Describe("Podman load", func() {
Expect(result.LineInOutputContains("docker")).To(Not(BeTrue()))
Expect(result.LineInOutputContains("localhost")).To(BeTrue())
})
+
+ It("podman load xz compressed image", func() {
+ outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
+
+ save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE})
+ save.WaitWithDefaultTimeout()
+ Expect(save.ExitCode()).To(Equal(0))
+ session := podmanTest.SystemExec("xz", []string{outfile})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ rmi := podmanTest.Podman([]string{"rmi", ALPINE})
+ rmi.WaitWithDefaultTimeout()
+ Expect(rmi.ExitCode()).To(Equal(0))
+
+ result := podmanTest.Podman([]string{"load", "-i", outfile + ".xz"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ })
})