From 89b50bcf94bd191c223520d99560fca27a2bdfab Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Tue, 20 Apr 2021 18:51:50 +0200 Subject: [PATCH] Fail fast when image is specified w/o tag --- test/utils/image/manifest.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index 3e5daa6b7c9..002b941303b 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -373,6 +373,9 @@ func ReplaceRegistryInImageURL(imageURL string) (string, error) { } } last := strings.SplitN(parts[countParts-1], ":", 2) + if len(last) == 1 { + return "", fmt.Errorf("image %q is required to be in an image:tag format", imageURL) + } config := getRepositoryMappedConfig(index, Config{ registry: parts[0], name: strings.Join([]string{strings.Join(parts[1:countParts-1], "/"), last[0]}, "/"),