Skip to content

Commit

Permalink
Add PullIfNotPresent to multiple container test
Browse files Browse the repository at this point in the history
  • Loading branch information
nak3 committed Aug 31, 2023
1 parent cea3201 commit 5fe9ce8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 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,12 @@ 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
containers[1].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
6 changes: 6 additions & 0 deletions test/e2e/multicontainer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ 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
containers[1].ImagePullPolicy = corev1.PullIfNotPresent
}

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

Expand Down

0 comments on commit 5fe9ce8

Please sign in to comment.