From e619e19e49947399554dd32ab77e9f7eaca387ff Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Thu, 31 Aug 2023 15:29:54 +0900 Subject: [PATCH] Add PullIfNotPresent to multiple container test --- test/conformance/api/v1/service_test.go | 5 +++++ test/e2e/multicontainer_test.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/conformance/api/v1/service_test.go b/test/conformance/api/v1/service_test.go index b3b9aadd202b..cee13ffc8354 100644 --- a/test/conformance/api/v1/service_test.go +++ b/test/conformance/api/v1/service_test.go @@ -724,6 +724,11 @@ func TestServiceCreateWithMultipleContainers(t *testing.T) { Image: pkgtest.ImagePath(names.Sidecars[0]), }} + // Please see the comment in test/v1/configuration.go. + if !test.ServingFlags.DisableOptionalAPI { + containers[0].ImagePullPolicy = corev1.PullIfNotPresent + } + // Setup initial Service if _, err := v1test.CreateServiceReady(t, clients, &names, func(svc *v1.Service) { svc.Spec.Template.Spec.Containers = containers diff --git a/test/e2e/multicontainer_test.go b/test/e2e/multicontainer_test.go index 10693c50a849..94f2743b1d9e 100644 --- a/test/e2e/multicontainer_test.go +++ b/test/e2e/multicontainer_test.go @@ -57,6 +57,11 @@ func TestMultiContainer(t *testing.T) { Image: pkgTest.ImagePath(names.Sidecars[0]), }} + // Please see the comment in test/v1/configuration.go. + if !test.ServingFlags.DisableOptionalAPI { + containers[0].ImagePullPolicy = corev1.PullIfNotPresent + } + test.EnsureTearDown(t, clients, &names) t.Log("Creating a new Service")