From f57d67c847116e8a7d35a3d553de7620b2913f65 Mon Sep 17 00:00:00 2001 From: jeffinkottaram <139225248+jeffinkottaram@users.noreply.github.com> Date: Sat, 6 Jul 2024 08:38:52 -0400 Subject: [PATCH] Fix `should complete a service status lifecycle` test Fix `[sig-network] Services [It] should complete a service status lifecycle [Conformance]` not iterating through all `Conditions` in status, causing failure when a `Condition` already exists. Log Conditions instead of Loadbalanacer. --- test/e2e/network/service.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/e2e/network/service.go b/test/e2e/network/service.go index f7e7e248d1b..ec075c50899 100644 --- a/test/e2e/network/service.go +++ b/test/e2e/network/service.go @@ -3519,7 +3519,7 @@ var _ = common.SIGDescribe("Services", func() { svc.ObjectMeta.Namespace == ns && svc.Annotations["patchedstatus"] == "true" if !found { - framework.Logf("Observed Service %v in namespace %v with annotations: %v & Conditions: %v", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) + framework.Logf("Observed Service %v in namespace %v with annotations: %v & Conditions: %v", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.Conditions) return false, nil } for _, cond := range svc.Status.Conditions { @@ -3528,11 +3528,10 @@ var _ = common.SIGDescribe("Services", func() { cond.Message == "Set from e2e test" { framework.Logf("Found Service %v in namespace %v with annotations: %v & Conditions: %v", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.Conditions) return found, nil - } else { - framework.Logf("Observed Service %v in namespace %v with annotations: %v & Conditions: %v", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.LoadBalancer) - return false, nil } } + framework.Logf("Observed Service %v in namespace %v with annotations: %v & Conditions: %v", svc.ObjectMeta.Name, svc.ObjectMeta.Namespace, svc.Annotations, svc.Status.Conditions) + return false, nil } framework.Logf("Observed event: %+v", event.Object) return false, nil