Skip to content

Commit

Permalink
CARRY: Remove check for restarted pod from test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ChughShilpa authored and ChristianZaccaria committed Sep 4, 2024
1 parent 9501eb6 commit 9765a5d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/util/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ func waitForOperatorAvailability(ctx context.Context, k8sClient client.Client, k
gomega.EventuallyWithOffset(2, func(g gomega.Gomega) error {
g.Expect(k8sClient.Get(ctx, key, deployment)).To(gomega.Succeed())
g.Expect(k8sClient.List(ctx, pods, client.InNamespace(GetNamespace()), client.MatchingLabels(deployment.Spec.Selector.MatchLabels))).To(gomega.Succeed())
for _, pod := range pods.Items {
for _, cs := range pod.Status.ContainerStatuses {
// To make sure that we don't have restarts of controller-manager.
// If we have that's mean that something went wrong, and there is
// no needs to continue trying check availability.
if cs.RestartCount > 0 {
return gomega.StopTrying(fmt.Sprintf("%q in %q has restarted %d times", cs.Name, pod.Name, cs.RestartCount))
}
}
}
// To verify that webhooks are ready, checking is deployment have condition Available=True.
g.Expect(deployment.Status.Conditions).To(gomega.ContainElement(gomega.BeComparableTo(
appsv1.DeploymentCondition{Type: appsv1.DeploymentAvailable, Status: corev1.ConditionTrue},
cmpopts.IgnoreFields(appsv1.DeploymentCondition{}, "Reason", "Message", "LastUpdateTime", "LastTransitionTime")),
Expand Down

0 comments on commit 9765a5d

Please sign in to comment.