From 296f50365b9e841e4ae8c02a43f1a28775b1d1e0 Mon Sep 17 00:00:00 2001 From: Warren Fernandes Date: Fri, 19 Jun 2020 14:55:18 -0600 Subject: [PATCH] Rename NodeImageWhiteList to NodePrePullImageList --- test/e2e/common/runtime.go | 4 ++-- test/e2e/framework/pods.go | 6 +++--- test/e2e_node/image_list.go | 8 ++++---- test/e2e_node/runtime_conformance_test.go | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/e2e/common/runtime.go b/test/e2e/common/runtime.go index d205be4d18f..ee7954d28d4 100644 --- a/test/e2e/common/runtime.go +++ b/test/e2e/common/runtime.go @@ -265,9 +265,9 @@ while true; do sleep 1; done ginkgo.Context("when running a container with a new image", func() { - // Images used for ConformanceContainer are not added into NodeImageWhiteList, because this test is + // Images used for ConformanceContainer are not added into NodePrePullImageList, because this test is // testing image pulling, these images don't need to be prepulled. The ImagePullPolicy - // is v1.PullAlways, so it won't be blocked by framework image white list check. + // is v1.PullAlways, so it won't be blocked by framework image pre-pull list check. imagePullTest := func(image string, hasSecret bool, expectedPhase v1.PodPhase, expectedPullStatus bool, windowsImage bool) { command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"} if windowsImage { diff --git a/test/e2e/framework/pods.go b/test/e2e/framework/pods.go index 05444c1d7ab..a6c134e6051 100644 --- a/test/e2e/framework/pods.go +++ b/test/e2e/framework/pods.go @@ -185,10 +185,10 @@ func (c *PodClient) mungeSpec(pod *v1.Pod) { // in the test anyway. continue } - // If the image policy is not PullAlways, the image must be in the white list and + // If the image policy is not PullAlways, the image must be in the pre-pull list and // pre-pulled. - gomega.Expect(ImageWhiteList.Has(c.Image)).To(gomega.BeTrue(), "Image %q is not in the white list, consider adding it to CommonImageWhiteList in test/e2e/common/util.go or NodeImageWhiteList in test/e2e_node/image_list.go", c.Image) - // Do not pull images during the tests because the images in white list should have + gomega.Expect(ImageWhiteList.Has(c.Image)).To(gomega.BeTrue(), "Image %q is not in the white list, consider adding it to CommonImageWhiteList in test/e2e/common/util.go or NodePrePullImageList in test/e2e_node/image_list.go", c.Image) + // Do not pull images during the tests because the images in pre-pull list should have // been prepulled. c.ImagePullPolicy = v1.PullNever } diff --git a/test/e2e_node/image_list.go b/test/e2e_node/image_list.go index 7783a5d6e51..b05025b61c8 100644 --- a/test/e2e_node/image_list.go +++ b/test/e2e_node/image_list.go @@ -43,9 +43,9 @@ const ( imagePullRetryDelay = time.Second ) -// NodeImageWhiteList is a list of images used in node e2e test. These images will be prepulled +// NodePrePullImageList is a list of images used in node e2e test. These images will be prepulled // before test running so that the image pulling won't fail in actual test. -var NodeImageWhiteList = sets.NewString( +var NodePrePullImageList = sets.NewString( imageutils.GetE2EImage(imageutils.Agnhost), "google/cadvisor:latest", "k8s.gcr.io/stress:v1", @@ -66,8 +66,8 @@ var NodeImageWhiteList = sets.NewString( // 2. the ones passed in from framework.TestContext.ExtraEnvs // So this function needs to be called after the extra envs are applied. func updateImageWhiteList() { - // Union NodeImageWhiteList and CommonImageWhiteList into the framework image white list. - framework.ImageWhiteList = NodeImageWhiteList.Union(commontest.CommonImageWhiteList) + // Union NodePrePullImageList and CommonImageWhiteList into the framework image pre-pull list. + framework.ImageWhiteList = NodePrePullImageList.Union(commontest.CommonImageWhiteList) // Images from extra envs framework.ImageWhiteList.Insert(getNodeProblemDetectorImage()) framework.ImageWhiteList.Insert(getSRIOVDevicePluginImage()) diff --git a/test/e2e_node/runtime_conformance_test.go b/test/e2e_node/runtime_conformance_test.go index 663233951c8..5f72e386334 100644 --- a/test/e2e_node/runtime_conformance_test.go +++ b/test/e2e_node/runtime_conformance_test.go @@ -48,9 +48,9 @@ var _ = framework.KubeDescribe("Container Runtime Conformance Test", func() { } } }` - // The following images are not added into NodeImageWhiteList, because this test is + // The following images are not added into NodePrePullImageList, because this test is // testing image pulling, these images don't need to be prepulled. The ImagePullPolicy - // is v1.PullAlways, so it won't be blocked by framework image white list check. + // is v1.PullAlways, so it won't be blocked by framework image pre-pull list check. for _, testCase := range []struct { description string image string