@@ -2086,7 +2086,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2086
2086
2087
2087
// Wait until InfraMachine has the ownerReference.
2088
2088
g .Eventually (func (g Gomega ) bool {
2089
- if err := env .Get (ctx , client .ObjectKeyFromObject (infraMachine ), infraMachine ); err != nil {
2089
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (infraMachine ), infraMachine ); err != nil {
2090
2090
return false
2091
2091
}
2092
2092
g .Expect (infraMachine .GetOwnerReferences ()).To (HaveLen (1 ))
@@ -2129,7 +2129,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2129
2129
2130
2130
// Wait until Machine was reconciled.
2131
2131
g .Eventually (func (g Gomega ) bool {
2132
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2132
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2133
2133
return false
2134
2134
}
2135
2135
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhasePending ))
@@ -2184,7 +2184,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2184
2184
2185
2185
// Wait until Machine was reconciled.
2186
2186
g .Eventually (func (g Gomega ) bool {
2187
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2187
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2188
2188
return false
2189
2189
}
2190
2190
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseProvisioning ))
@@ -2274,7 +2274,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2274
2274
2275
2275
// Wait until Machine was reconciled.
2276
2276
g .Eventually (func (g Gomega ) bool {
2277
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2277
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2278
2278
return false
2279
2279
}
2280
2280
g .Expect (machine .Status .Addresses ).To (HaveLen (2 ))
@@ -2354,7 +2354,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2354
2354
2355
2355
// Wait until Machine was reconciled.
2356
2356
g .Eventually (func (g Gomega ) bool {
2357
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2357
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2358
2358
return false
2359
2359
}
2360
2360
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseRunning ))
@@ -2433,7 +2433,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2433
2433
2434
2434
// Wait until Machine was reconciled.
2435
2435
g .Eventually (func (g Gomega ) bool {
2436
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2436
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2437
2437
return false
2438
2438
}
2439
2439
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseRunning ))
@@ -2496,7 +2496,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2496
2496
2497
2497
// Wait until Machine was reconciled.
2498
2498
g .Eventually (func (g Gomega ) bool {
2499
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2499
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2500
2500
return false
2501
2501
}
2502
2502
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseProvisioned ))
@@ -2590,7 +2590,7 @@ func TestReconcileMachinePhases(t *testing.T) {
2590
2590
2591
2591
// Wait until Machine was reconciled.
2592
2592
g .Eventually (func (g Gomega ) bool {
2593
- if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2593
+ if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2594
2594
return false
2595
2595
}
2596
2596
g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseDeleting ))
0 commit comments