diff options
author | umohnani8 <umohnani@redhat.com> | 2018-05-21 13:53:19 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-25 15:15:47 +0000 |
commit | c8b72e57a75262c0edeea839e9e34bb0c3e03d13 (patch) | |
tree | 3a2bb7210d309e358bfe84a0ab0f60e57b9f2e2f /test/e2e/load_test.go | |
parent | 0a4ade1c175d3188ad55d22d751a86c96e060a44 (diff) | |
download | podman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.tar.gz podman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.tar.bz2 podman-c8b72e57a75262c0edeea839e9e34bb0c3e03d13.zip |
save and load should support multi-tag for docker-archive
The docker-archive tar files can have multiple tags for the same
image stored in it. Load pulls all the tags found in the archive
when loading a tar file. Save can oush multiple tags of the same
image to a tar archive.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #819
Approved by: rhatdan
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r-- | test/e2e/load_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index e9c2d94ab..3fe68ad8e 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -133,4 +133,32 @@ var _ = Describe("Podman load", func() { save.WaitWithDefaultTimeout() Expect(save.ExitCode()).ToNot(Equal(0)) }) + + It("podman load multiple tags", func() { + outfile := filepath.Join(podmanTest.TempDir, "alpine.tar") + alpVersion := "docker.io/library/alpine:3.2" + + pull := podmanTest.Podman([]string{"pull", alpVersion}) + pull.WaitWithDefaultTimeout() + Expect(pull.ExitCode()).To(Equal(0)) + + save := podmanTest.Podman([]string{"save", "-o", outfile, ALPINE, alpVersion}) + save.WaitWithDefaultTimeout() + Expect(save.ExitCode()).To(Equal(0)) + + rmi := podmanTest.Podman([]string{"rmi", ALPINE, alpVersion}) + rmi.WaitWithDefaultTimeout() + Expect(rmi.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"load", "-i", outfile}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + + inspect := podmanTest.Podman([]string{"inspect", ALPINE}) + inspect.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + inspect = podmanTest.Podman([]string{"inspect", alpVersion}) + inspect.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + }) }) |