@@ -813,7 +813,7 @@ func verifyV1Beta2ConditionsTrueV1Beta1(ctx context.Context, c client.Client, cl
813
813
return c .Get (ctx , key , cluster )
814
814
}, 3 * time .Minute , 3 * time .Second ).Should (Succeed (), "Failed to get Cluster object %s" , klog .KRef (clusterNamespace , clusterName ))
815
815
816
- if cluster .Status .V1Beta2 != nil && cluster .Status .V1Beta2 .Conditions == nil {
816
+ if cluster .Status .V1Beta2 != nil && len ( cluster .Status .V1Beta2 .Conditions ) > 0 {
817
817
for _ , conditionType := range v1beta2conditionTypes {
818
818
for _ , condition := range cluster .Status .V1Beta2 .Conditions {
819
819
if condition .Type != conditionType {
@@ -832,8 +832,11 @@ func verifyV1Beta2ConditionsTrueV1Beta1(ctx context.Context, c client.Client, cl
832
832
clusterv1 .ClusterNameLabel : clusterName ,
833
833
})
834
834
}, 3 * time .Minute , 3 * time .Second ).Should (Succeed (), "Failed to list Machines for Cluster %s" , klog .KObj (cluster ))
835
- if cluster .Status .V1Beta2 != nil && cluster .Status .V1Beta2 .Conditions == nil {
835
+ if cluster .Status .V1Beta2 != nil && len ( cluster .Status .V1Beta2 .Conditions ) > 0 {
836
836
for _ , machine := range machineList .Items {
837
+ if machine .Status .V1Beta2 == nil || len (machine .Status .V1Beta2 .Conditions ) == 0 {
838
+ continue
839
+ }
837
840
for _ , conditionType := range v1beta2conditionTypes {
838
841
for _ , condition := range machine .Status .V1Beta2 .Conditions {
839
842
if condition .Type != conditionType {
0 commit comments