@@ -2531,7 +2531,7 @@ func TestReconcileMachinePhases(t *testing.T) {
25312531
25322532 // Wait until InfraMachine has the ownerReference.
25332533 g .Eventually (func (g Gomega ) bool {
2534- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (infraMachine ), infraMachine ); err != nil {
2534+ if err := env .Get (ctx , client .ObjectKeyFromObject (infraMachine ), infraMachine ); err != nil {
25352535 return false
25362536 }
25372537 g .Expect (infraMachine .GetOwnerReferences ()).To (HaveLen (1 ))
@@ -2574,7 +2574,7 @@ func TestReconcileMachinePhases(t *testing.T) {
25742574
25752575 // Wait until Machine was reconciled.
25762576 g .Eventually (func (g Gomega ) bool {
2577- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2577+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
25782578 return false
25792579 }
25802580 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhasePending ))
@@ -2629,7 +2629,7 @@ func TestReconcileMachinePhases(t *testing.T) {
26292629
26302630 // Wait until Machine was reconciled.
26312631 g .Eventually (func (g Gomega ) bool {
2632- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2632+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
26332633 return false
26342634 }
26352635 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseProvisioning ))
@@ -2719,7 +2719,7 @@ func TestReconcileMachinePhases(t *testing.T) {
27192719
27202720 // Wait until Machine was reconciled.
27212721 g .Eventually (func (g Gomega ) bool {
2722- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2722+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
27232723 return false
27242724 }
27252725 g .Expect (machine .Status .Addresses ).To (HaveLen (2 ))
@@ -2799,7 +2799,7 @@ func TestReconcileMachinePhases(t *testing.T) {
27992799
28002800 // Wait until Machine was reconciled.
28012801 g .Eventually (func (g Gomega ) bool {
2802- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2802+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
28032803 return false
28042804 }
28052805 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseRunning ))
@@ -2878,7 +2878,7 @@ func TestReconcileMachinePhases(t *testing.T) {
28782878
28792879 // Wait until Machine was reconciled.
28802880 g .Eventually (func (g Gomega ) bool {
2881- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2881+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
28822882 return false
28832883 }
28842884 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseRunning ))
@@ -2976,7 +2976,7 @@ func TestReconcileMachinePhases(t *testing.T) {
29762976
29772977 // Wait until Machine was reconciled.
29782978 g .Eventually (func (g Gomega ) bool {
2979- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
2979+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
29802980 return false
29812981 }
29822982 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseUpdating ))
@@ -3039,7 +3039,7 @@ func TestReconcileMachinePhases(t *testing.T) {
30393039
30403040 // Wait until Machine was reconciled.
30413041 g .Eventually (func (g Gomega ) bool {
3042- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
3042+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
30433043 return false
30443044 }
30453045 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseProvisioned ))
@@ -3133,7 +3133,7 @@ func TestReconcileMachinePhases(t *testing.T) {
31333133
31343134 // Wait until Machine was reconciled.
31353135 g .Eventually (func (g Gomega ) bool {
3136- if err := env .DirectAPIServerGet (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
3136+ if err := env .Get (ctx , client .ObjectKeyFromObject (machine ), machine ); err != nil {
31373137 return false
31383138 }
31393139 g .Expect (machine .Status .GetTypedPhase ()).To (Equal (clusterv1 .MachinePhaseDeleting ))
0 commit comments