From 20e104351dd4f85e56d49cca70dd9aaee8b72ffc Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 27 Oct 2020 04:47:35 -0600 Subject: move from docker.io Followon to #7965 (mirror registry). mirror.gcr.io doesn't cache all the images we need, and I can't find a way to add to its cache, so let's just use quay.io for those images that it can't serve. Tools used: skopeo copy --all docker://docker.io/library/alpine:3.10.2 \ docker://quay.io/libpod/alpine:3.10.2 ...and also: docker.io/library/alpine:3.2 docker.io/library/busybox:latest docker.io/library/busybox:glibc docker.io/library/busybox:1.30.1 docker.io/library/redis:alpine docker.io/libpod/alpine-with-bogus-seccomp:label docker.io/libpod/alpine-with-seccomp:label docker.io/libpod/alpine_healthcheck:latest docker.io/libpod/badhealthcheck:latest Since most of those were new quay.io/libpod images, they required going in through the quay.io GUI, image, settings, Make Public. Signed-off-by: Ed Santiago --- test/utils/utils.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'test/utils') diff --git a/test/utils/utils.go b/test/utils/utils.go index a45ce7b36..cb76d4a54 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -302,12 +302,7 @@ func (s *PodmanSession) LineInOutputContains(term string) bool { // by podman-images(1). func (s *PodmanSession) LineInOutputContainsTag(repo, tag string) bool { tagMap := tagOutputToMap(s.OutputToStringArray()) - for r, t := range tagMap { - if repo == r && tag == t { - return true - } - } - return false + return tagMap[repo][tag] } // IsJSONOutputValid attempts to unmarshal the session buffer @@ -366,10 +361,11 @@ func StringInSlice(s string, sl []string) bool { } // tagOutPutToMap parses each string in imagesOutput and returns -// a map of repo:tag pairs. Notice, the first array item will +// a map whose key is a repo, and value is another map whose keys +// are the tags found for that repo. Notice, the first array item will // be skipped as it's considered to be the header. -func tagOutputToMap(imagesOutput []string) map[string]string { - m := make(map[string]string) +func tagOutputToMap(imagesOutput []string) map[string]map[string]bool { + m := make(map[string]map[string]bool) // iterate over output but skip the header for _, i := range imagesOutput[1:] { tmp := []string{} @@ -383,7 +379,10 @@ func tagOutputToMap(imagesOutput []string) map[string]string { if len(tmp) < 2 { continue } - m[tmp[0]] = tmp[1] + if m[tmp[0]] == nil { + m[tmp[0]] = map[string]bool{} + } + m[tmp[0]][tmp[1]] = true } return m } -- cgit v1.2.3-54-g00ecf