@@ -35,7 +35,7 @@ import (
3535 "k8s.io/client-go/tools/record"
3636 clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
3737 "sigs.k8s.io/cluster-api/util"
38- "sigs.k8s.io/cluster-api/util/patch"
38+ v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1 /patch"
3939 ctrl "sigs.k8s.io/controller-runtime"
4040 "sigs.k8s.io/controller-runtime/pkg/client"
4141 "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
@@ -158,7 +158,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
158158
159159 // Set owner ref from CAPI machine to CS machine and patch back the CS machine.
160160 g .Eventually (func () error {
161- ph , err := patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
161+ ph , err := v1beta1patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
162162 g .Expect (err ).ToNot (HaveOccurred ())
163163 dummies .CSMachine1 .OwnerReferences = append (dummies .CSMachine1 .OwnerReferences , metav1.OwnerReference {
164164 Kind : "Machine" ,
@@ -167,7 +167,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
167167 UID : "uniqueness" ,
168168 })
169169
170- return ph .Patch (ctx , dummies .CSMachine1 , patch .WithStatusObservedGeneration {})
170+ return ph .Patch (ctx , dummies .CSMachine1 , v1beta1patch .WithStatusObservedGeneration {})
171171 }, timeout ).Should (Succeed ())
172172
173173 setClusterReady (g , testEnv .Client )
@@ -210,13 +210,13 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
210210
211211 // Set node ref on CAPI machine to simulate that the machine is operational.
212212 g .Eventually (func () error {
213- ph , err := patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
213+ ph , err := v1beta1patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
214214 g .Expect (err ).ToNot (HaveOccurred ())
215215 dummies .CAPIMachine .Status .NodeRef = clusterv1.MachineNodeReference {
216- Name : "test-node" ,
216+ Name : "test-node" ,
217217 }
218218
219- return ph .Patch (ctx , dummies .CAPIMachine , patch .WithStatusObservedGeneration {})
219+ return ph .Patch (ctx , dummies .CAPIMachine , v1beta1patch .WithStatusObservedGeneration {})
220220 }, timeout ).Should (Succeed ())
221221
222222 // Reconcile again (it is running).
@@ -312,13 +312,13 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
312312 g .Expect (testEnv .Create (ctx , dummies .CAPIMachine )).To (Succeed ())
313313 // Set the NodeRef on the CAPI machine to simulate that the machine is operational.
314314 g .Eventually (func () error {
315- ph , err := patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
315+ ph , err := v1beta1patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
316316 g .Expect (err ).ToNot (HaveOccurred ())
317317 dummies .CAPIMachine .Status .NodeRef = clusterv1.MachineNodeReference {
318- Name : "test-node" ,
318+ Name : "test-node" ,
319319 }
320320
321- return ph .Patch (ctx , dummies .CAPIMachine , patch .WithStatusObservedGeneration {})
321+ return ph .Patch (ctx , dummies .CAPIMachine , v1beta1patch .WithStatusObservedGeneration {})
322322 }, timeout ).Should (Succeed ())
323323 g .Expect (testEnv .Create (ctx , dummies .CSMachine1 )).To (Succeed ())
324324
@@ -330,7 +330,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
330330
331331 // Set owner ref from CAPI machine to CS machine and patch back the CS machine.
332332 g .Eventually (func () error {
333- ph , err := patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
333+ ph , err := v1beta1patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
334334 g .Expect (err ).ToNot (HaveOccurred ())
335335 dummies .CSMachine1 .OwnerReferences = append (dummies .CSMachine1 .OwnerReferences , metav1.OwnerReference {
336336 Kind : "Machine" ,
@@ -342,7 +342,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
342342 // Set the instance state to running to simulate that the machine is operational.
343343 dummies .CSMachine1 .Status .InstanceState = cloud .InstanceStateRunning
344344
345- return ph .Patch (ctx , dummies .CSMachine1 , patch .WithStatusObservedGeneration {})
345+ return ph .Patch (ctx , dummies .CSMachine1 , v1beta1patch .WithStatusObservedGeneration {})
346346 }, timeout ).Should (Succeed ())
347347
348348 setClusterReady (g , testEnv .Client )
0 commit comments