@@ -132,8 +132,12 @@ func TestSetBootstrapReadyCondition(t *testing.T) {
132
132
},
133
133
},
134
134
{
135
- name : "Use status.BoostrapReady flag as a fallback Ready condition from bootstrap config is missing (ready true)" ,
136
- machine : defaultMachine .DeepCopy (),
135
+ name : "Use status.BoostrapReady flag as a fallback Ready condition from bootstrap config is missing (ready true)" ,
136
+ machine : func () * clusterv1.Machine {
137
+ m := defaultMachine .DeepCopy ()
138
+ m .Status .BootstrapReady = true
139
+ return m
140
+ }(),
137
141
bootstrapConfig : & unstructured.Unstructured {Object : map [string ]interface {}{
138
142
"kind" : "GenericBootstrapConfig" ,
139
143
"apiVersion" : "bootstrap.cluster.x-k8s.io/v1beta1" ,
@@ -148,9 +152,9 @@ func TestSetBootstrapReadyCondition(t *testing.T) {
148
152
bootstrapConfigIsNotFound : false ,
149
153
expectCondition : metav1.Condition {
150
154
Type : clusterv1 .MachineBootstrapConfigReadyV1Beta2Condition ,
151
- Status : metav1 .ConditionFalse ,
155
+ Status : metav1 .ConditionTrue ,
152
156
Reason : clusterv1 .MachineBootstrapConfigReadyNoReasonReportedV1Beta2Reason ,
153
- Message : "GenericBootstrapConfig status.ready is false " ,
157
+ Message : "GenericBootstrapConfig status.ready is true " ,
154
158
},
155
159
},
156
160
{
@@ -322,8 +326,12 @@ func TestSetInfrastructureReadyCondition(t *testing.T) {
322
326
},
323
327
},
324
328
{
325
- name : "Use status.InfrastructureReady flag as a fallback Ready condition from infra machine is missing (ready true)" ,
326
- machine : defaultMachine .DeepCopy (),
329
+ name : "Use status.InfrastructureReady flag as a fallback Ready condition from infra machine is missing (ready true)" ,
330
+ machine : func () * clusterv1.Machine {
331
+ m := defaultMachine .DeepCopy ()
332
+ m .Status .InfrastructureReady = true
333
+ return m
334
+ }(),
327
335
infraMachine : & unstructured.Unstructured {Object : map [string ]interface {}{
328
336
"kind" : "GenericInfrastructureMachine" ,
329
337
"apiVersion" : "infrastructure.cluster.x-k8s.io/v1beta1" ,
@@ -338,9 +346,9 @@ func TestSetInfrastructureReadyCondition(t *testing.T) {
338
346
infraMachineIsNotFound : false ,
339
347
expectCondition : metav1.Condition {
340
348
Type : clusterv1 .MachineInfrastructureReadyV1Beta2Condition ,
341
- Status : metav1 .ConditionFalse ,
349
+ Status : metav1 .ConditionTrue ,
342
350
Reason : clusterv1 .MachineInfrastructureReadyNoReasonReportedV1Beta2Reason ,
343
- Message : "GenericInfrastructureMachine status.ready is false " ,
351
+ Message : "GenericInfrastructureMachine status.ready is true " ,
344
352
},
345
353
},
346
354
{
0 commit comments