Skip to content

Commit

Permalink
Add PullIfNotPresent to multiple container test (#14317)
Browse files Browse the repository at this point in the history
* Add PullIfNotPresent to multiple container test

* Use for loop
  • Loading branch information
nak3 authored Sep 4, 2023
1 parent 5a2dc2e commit b6d4f61
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/conformance/api/v1/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,13 @@ func TestServiceCreateWithMultipleContainers(t *testing.T) {
Image: pkgtest.ImagePath(names.Sidecars[0]),
}}

// Please see the comment in test/v1/configuration.go.
if !test.ServingFlags.DisableOptionalAPI {
for _, c := range containers {
c.ImagePullPolicy = corev1.PullIfNotPresent
}
}

// Setup initial Service
if _, err := v1test.CreateServiceReady(t, clients, &names, func(svc *v1.Service) {
svc.Spec.Template.Spec.Containers = containers
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/multicontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ func TestMultiContainer(t *testing.T) {
Image: pkgTest.ImagePath(names.Sidecars[0]),
}}

// Please see the comment in test/v1/configuration.go.
if !test.ServingFlags.DisableOptionalAPI {
for _, c := range containers {
c.ImagePullPolicy = corev1.PullIfNotPresent
}
}

test.EnsureTearDown(t, clients, &names)
t.Log("Creating a new Service")

Expand Down

0 comments on commit b6d4f61

Please sign in to comment.