diff options
author | haircommander <pehunt@redhat.com> | 2018-07-13 17:45:55 -0400 |
---|---|---|
committer | haircommander <pehunt@redhat.com> | 2018-07-20 11:46:11 -0400 |
commit | 0fecfeee6398e2db6b7b3fd257645a6ea9aab542 (patch) | |
tree | 0c8bc2bc742ae2001f992c777ab0ac4d46947553 /test/e2e/load_test.go | |
parent | ba1871dac033783ab0329c9b3c9113a34a90992f (diff) | |
download | podman-0fecfeee6398e2db6b7b3fd257645a6ea9aab542.tar.gz podman-0fecfeee6398e2db6b7b3fd257645a6ea9aab542.tar.bz2 podman-0fecfeee6398e2db6b7b3fd257645a6ea9aab542.zip |
Podman load/tag/save prepend localhost when no repository is present
Instead of having docker.io/library as its repository. Test included.
Signed-off-by: haircommander <pehunt@redhat.com>
Diffstat (limited to 'test/e2e/load_test.go')
-rw-r--r-- | test/e2e/load_test.go | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 3fe68ad8e..d39f75927 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -161,4 +161,60 @@ var _ = Describe("Podman load", func() { inspect.WaitWithDefaultTimeout() Expect(result.ExitCode()).To(Equal(0)) }) + + It("podman load localhost repo from scratch", func() { + outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz") + setup := podmanTest.Podman([]string{"pull", fedoraMinimal}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"tag", "fedora-minimal", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"rmi", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + load := podmanTest.Podman([]string{"load", "-i", outfile}) + load.WaitWithDefaultTimeout() + Expect(load.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"images", "-f", "label", "hello:world"}) + result.WaitWithDefaultTimeout() + Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + }) + + It("podman load localhost repo from dir", func() { + outfile := filepath.Join(podmanTest.TempDir, "load") + setup := podmanTest.Podman([]string{"pull", fedoraMinimal}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"tag", "fedora-minimal", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-dir", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"rmi", "hello:world"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + load := podmanTest.Podman([]string{"load", "-i", outfile}) + load.WaitWithDefaultTimeout() + Expect(load.ExitCode()).To(Equal(0)) + + result := podmanTest.Podman([]string{"images", "-f", "label", "load:latest"}) + result.WaitWithDefaultTimeout() + Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + }) }) |