From 89b50bcf94bd191c223520d99560fca27a2bdfab Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Tue, 20 Apr 2021 18:51:50 +0200 Subject: [PATCH 1/2] 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]}, "/"), From 3edabfb4604c29c2fe76598372b7136bf600f92a Mon Sep 17 00:00:00 2001 From: Maciej Szulik Date: Tue, 20 Apr 2021 21:11:35 +0200 Subject: [PATCH 2/2] Switch to a proper busybox test image --- test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml | 2 +- test/utils/image/manifest.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml index 7892392931e..36c88d9348c 100644 --- a/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml +++ b/test/e2e/testing-manifests/storage-csi/mock/csi-mock-proxy.yaml @@ -73,7 +73,7 @@ spec: # test for directories or create them. It needs additional privileges # for that. - name: busybox - image: k8s.gcr.io/busybox + image: k8s.gcr.io/e2e-test-images/busybox:1.29-1 securityContext: privileged: true command: diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index 002b941303b..a8f60a8de85 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -387,6 +387,8 @@ func ReplaceRegistryInImageURL(imageURL string) (string, error) { switch registryAndUser { case "gcr.io/kubernetes-e2e-test-images": registryAndUser = e2eRegistry + case "k8s.gcr.io/e2e-test-images": + registryAndUser = promoterE2eRegistry case "k8s.gcr.io": registryAndUser = gcRegistry case "k8s.gcr.io/sig-storage":