From 1543a01be874af690b7ade9b226d9d62e43ac036 Mon Sep 17 00:00:00 2001 From: TomSweeneyRedHat Date: Fri, 18 Jan 2019 20:01:29 -0500 Subject: Add --all-tags to pull command Signed-off-by: TomSweeneyRedHat Add --all-tags for the `podman pull` command so all tags of an image will be pulled, not just ':latest'. Emulates the change in Buildah https://github.com/containers/buildah/pull/1263 Signed-off-by: TomSweeneyRedHat --- test/e2e/pull_test.go | 16 ++++++++++++++++ test/utils/utils.go | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index bfae15152..faad8202e 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -163,4 +163,20 @@ var _ = Describe("Podman pull", func() { Expect(pull.OutputToString()).To(ContainSubstring(shortImageId)) }) + + It("podman pull check all tags", func() { + session := podmanTest.Podman([]string{"pull", "--all-tags", "alpine"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.LineInOuputStartsWith("Pulled Images:")).To(BeTrue()) + + session = podmanTest.Podman([]string{"images"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 4)) + + rmi := podmanTest.Podman([]string{"rmi", "-a", "-f"}) + rmi.WaitWithDefaultTimeout() + Expect(rmi.ExitCode()).To(Equal(0)) + }) }) diff --git a/test/utils/utils.go b/test/utils/utils.go index 23dcb95e3..aace018cd 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -270,7 +270,7 @@ func (s *PodmanSession) LineInOuputStartsWith(term string) bool { } //LineInOutputContains returns true if a line in a -// session output starts with the supplied string +// session output contains the supplied string func (s *PodmanSession) LineInOutputContains(term string) bool { for _, i := range s.OutputToStringArray() { if strings.Contains(i, term) { -- cgit v1.2.3-54-g00ecf