diff options
author | umohnani8 <umohnani@redhat.com> | 2018-07-23 11:46:43 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-30 16:56:11 +0000 |
commit | 49bdd8421be9ad42ec85c2b43e7fdc76cca8d8f8 (patch) | |
tree | 7399eb7367cf7965689224922e5a967c3fd7e6dc | |
parent | 49b3647410474cfc2d5010c6c329e6673fc02fe4 (diff) | |
download | podman-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
-rw-r--r-- | Dockerfile | 1 | ||||
-rw-r--r-- | Dockerfile.CentOS | 1 | ||||
-rw-r--r-- | Dockerfile.Fedora | 1 | ||||
-rw-r--r-- | test/e2e/load_test.go | 19 |
4 files changed, 22 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile index 2a65d95a7..40b07a5c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,6 +38,7 @@ RUN apt-get update && apt-get install -y \ python3-pip \ python3-dateutil \ python3-setuptools \ + xz-utils \ --no-install-recommends \ && apt-get clean diff --git a/Dockerfile.CentOS b/Dockerfile.CentOS index 0c9917210..06f7ed602 100644 --- a/Dockerfile.CentOS +++ b/Dockerfile.CentOS @@ -24,6 +24,7 @@ RUN yum -y install btrfs-progs-devel \ which\ golang-github-cpuguy83-go-md2man \ nmap-ncat \ + xz \ iptables && yum clean all # Install CNI plugins diff --git a/Dockerfile.Fedora b/Dockerfile.Fedora index 166ced885..f65cf15d9 100644 --- a/Dockerfile.Fedora +++ b/Dockerfile.Fedora @@ -26,6 +26,7 @@ RUN dnf -y install btrfs-progs-devel \ golang-github-cpuguy83-go-md2man \ procps-ng \ nmap-ncat \ + xz \ iptables && dnf clean all # Install CNI plugins 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)) + }) }) |