Skip to content

Commit

Permalink
Merge pull request #24425 from mfojtik/fix-image-checks
Browse files Browse the repository at this point in the history
test: fix the operator images test to skip succeeded containers
  • Loading branch information
openshift-merge-robot committed Feb 19, 2020
2 parents 5e88fcd + 2e6ef7a commit df9407a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/extended/operators/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ var _ = Describe("[Feature:Platform] Managed cluster", func() {
e2e.Failf("unable to list pods: %v", err)
}

// skip containers that are known to be already succeeded when this test run and they always result
// into error: cannot exec into a container in a completed pod; current phase is Succeeded.
skipPodContainersNames := sets.NewString(
"installer",
"pruner",
)

// list of pods that use images not in the release payload
invalidPodContainerImages := sets.NewString()
invalidPodContainerImagePullPolicy := sets.NewString()
Expand All @@ -91,9 +98,15 @@ var _ = Describe("[Feature:Platform] Managed cluster", func() {
}
containersToInspect := []v1.Container{}
for j := range pod.Spec.InitContainers {
if skipPodContainersNames.Has(pod.Spec.InitContainers[j].Name) {
continue
}
containersToInspect = append(containersToInspect, pod.Spec.InitContainers[j])
}
for j := range pod.Spec.Containers {
if skipPodContainersNames.Has(pod.Spec.Containers[j].Name) {
continue
}
containersToInspect = append(containersToInspect, pod.Spec.Containers[j])
}
for j := range containersToInspect {
Expand Down

0 comments on commit df9407a

Please sign in to comment.