From d274107620ec3b7902a86b3cdcb1c9785411cdb6 Mon Sep 17 00:00:00 2001 From: Claudiu Belu Date: Mon, 17 Jun 2019 01:38:57 -0700 Subject: [PATCH] tests: Fixes Windows image pulling tests A previous commit removed all hardcoded image names from the tests and centralized them into kubernetes/test/utils/image/manifest.go, but it contained a few errors, which causes the image pulling tests to fail on Windows: 1. No entry was written for AuthenticatedWindowsNanoServer, causing one of the tests to try to spawn a pod with the image name /. 2. The registry set for WindowsNanoServer was e2eRegistry, which is set to a dockerhub registry (e2eteam) in all sig-windows jobs, which is not the purpose of the test itself (the test tries to spawn a pod using an image from gcr.io). The reason why e2eRegistry is set to e2eteam is because that registry contains the Windows images needed for all the Kubernetes E2E tests. This commit addresses this issue. --- test/utils/image/manifest.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils/image/manifest.go b/test/utils/image/manifest.go index b8ec2be788a..af5209e31b1 100644 --- a/test/utils/image/manifest.go +++ b/test/utils/image/manifest.go @@ -90,6 +90,7 @@ var ( registry = initReg() dockerLibraryRegistry = registry.DockerLibraryRegistry e2eRegistry = registry.E2eRegistry + e2eGcRegistry = "gcr.io/kubernetes-e2e-test-images" gcAuthenticatedRegistry = registry.GcAuthenticatedRegistry gcRegistry = registry.GcRegistry googleContainerRegistry = registry.GoogleContainerRegistry @@ -221,6 +222,7 @@ func initImageConfigs() map[int]Config { configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.0"} configs[Alpine] = Config{dockerLibraryRegistry, "alpine", "3.7"} configs[AuthenticatedAlpine] = Config{gcAuthenticatedRegistry, "alpine", "3.7"} + configs[AuthenticatedWindowsNanoServer] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"} configs[APIServer] = Config{e2eRegistry, "sample-apiserver", "1.10"} configs[AppArmorLoader] = Config{e2eRegistry, "apparmor-loader", "1.0"} configs[AuditProxy] = Config{e2eRegistry, "audit-proxy", "1.0"} @@ -269,7 +271,7 @@ func initImageConfigs() map[int]Config { configs[VolumeISCSIServer] = Config{e2eRegistry, "volume/iscsi", "2.0"} configs[VolumeGlusterServer] = Config{e2eRegistry, "volume/gluster", "1.0"} configs[VolumeRBDServer] = Config{e2eRegistry, "volume/rbd", "1.0.1"} - configs[WindowsNanoServer] = Config{e2eRegistry, "windows-nanoserver", "v1"} + configs[WindowsNanoServer] = Config{e2eGcRegistry, "windows-nanoserver", "v1"} return configs }