Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion test/e2e/catalog_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"k8s.io/apimachinery/pkg/util/intstr"

"net"
Expand Down Expand Up @@ -1169,6 +1170,10 @@ var _ = Describe("Starting CatalogSource e2e tests", Label("CatalogSource"), fun
}

for _, pod := range podList.Items {
// Ignore terminating pods
if pod.DeletionTimestamp != nil {
continue
}
ctx.Ctx().Logf("old image id %s\n new image id %s\n", registryPod.Items[0].Status.ContainerStatuses[0].ImageID,
pod.Status.ContainerStatuses[0].ImageID)
if pod.Status.ContainerStatuses[0].ImageID != registryPod.Items[0].Status.ContainerStatuses[0].ImageID {
Expand All @@ -1194,10 +1199,11 @@ var _ = Describe("Starting CatalogSource e2e tests", Label("CatalogSource"), fun
return false
}
By("await new catalog source and ensure old one was deleted")
// the required check for ensuring there's a non-terminating pod with the new image is covered in the podCheckFunc
registryPods, err = awaitPodsWithInterval(GinkgoT(), c, source.GetNamespace(), selector.String(), 30*time.Second, 10*time.Minute, podCheckFunc)
Expect(err).ShouldNot(HaveOccurred(), "error awaiting registry pod")
Expect(registryPods).ShouldNot(BeNil(), "nil registry pods")
Expect(registryPods.Items).To(HaveLen(1), "unexpected number of registry pods found")
Expect(registryPods.Items).ToNot(BeEmpty(), "no registry pods found")

By("update catalog source with annotation (to kick resync)")
Eventually(func() error {
Expand Down