diff options
author | haircommander <pehunt@redhat.com> | 2018-07-23 12:56:24 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-08 21:04:11 +0000 |
commit | 879453eaf16675f732dd87fd250ccaaac72f4285 (patch) | |
tree | 297b6a1fef1491353a1478ae278386583545fcaa /test | |
parent | 9bd991f477ab2bb4428df6286452516c3deb970e (diff) | |
download | podman-879453eaf16675f732dd87fd250ccaaac72f4285.tar.gz podman-879453eaf16675f732dd87fd250ccaaac72f4285.tar.bz2 podman-879453eaf16675f732dd87fd250ccaaac72f4285.zip |
Fix ambiguity in adding localhost to podman save
...and some naming decisions.
This change ensures podman save doesn't incorrectly prepend localhost when saving an image.
Signed-off-by: haircommander <pehunt@redhat.com>
Closes: #1140
Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/load_test.go | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index d2ea8c6c7..4f288c216 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -166,7 +166,7 @@ var _ = Describe("Podman load", func() { Expect(result.ExitCode()).To(Equal(0)) }) - It("podman load localhost repo from scratch", func() { + It("podman load localhost registry from scratch", func() { outfile := filepath.Join(podmanTest.TempDir, "load_test.tar.gz") setup := podmanTest.Podman([]string{"tag", ALPINE, "hello:world"}) @@ -191,7 +191,35 @@ var _ = Describe("Podman load", func() { Expect(result.LineInOutputContains("localhost")).To(BeTrue()) }) - It("podman load localhost repo from dir", func() { + It("podman load localhost registry from scratch and :latest", 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"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"save", "-o", outfile, "--format", "oci-archive", "hello"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + + setup = podmanTest.Podman([]string{"rmi", "hello"}) + 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:latest"}) + result.WaitWithDefaultTimeout() + Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.LineInOutputContains("localhost")).To(BeTrue()) + }) + + It("podman load localhost registry from dir", func() { outfile := filepath.Join(podmanTest.TempDir, "load") setup := podmanTest.Podman([]string{"tag", BB, "hello:world"}) |