Skip to content

Commit be0dd48

Browse files
sutaakaropenshift-merge-robot
authored andcommitted
Test support: return default status if Route is not initialized
1 parent 39225d3 commit be0dd48

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/support/conditions.go

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ func ConditionStatus[T conditionType](conditionType T) func(any) corev1.Conditio
4242
return c.Status
4343
}
4444
case *routev1.Route:
45+
if len(o.Status.Ingress) == 0 {
46+
// Route is not initialized yet
47+
break
48+
}
4549
if c := getRouteCondition(o.Status.Ingress[0].Conditions, routev1.RouteIngressConditionType(conditionType)); c != nil {
4650
return c.Status
4751
}

0 commit comments

Comments
 (0)