From 49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Mon, 23 Jul 2018 11:46:43 -0400 Subject: 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 Closes: #1137 Approved by: rhatdan --- test/e2e/load_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') 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)) + }) }) -- cgit v1.2.3-54-g00ecf