@@ -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- v1beta1patch "sigs.k8s.io/cluster-api/util/deprecated/v1beta1 /patch"
38+ "sigs.k8s.io/cluster-api/util/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 := v1beta1patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
161+ ph , err := patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
162162 g .Expect (err ).ToNot (HaveOccurred ())
163163 dummies .CSMachine1 .OwnerReferences = append (dummies .CSMachine1 .OwnerReferences , metav1.OwnerReference {
164164 Kind : "Machine" ,
@@ -172,7 +172,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
172172 dummies .CSMachine1 .Labels [infrav1 .FailureDomainLabelName ] =
173173 infrav1 .FailureDomainHashedMetaName (dummies .CSMachine1 .Spec .FailureDomainName , dummies .CAPICluster .Name )
174174
175- return ph .Patch (ctx , dummies .CSMachine1 , v1beta1patch .WithStatusObservedGeneration {})
175+ return ph .Patch (ctx , dummies .CSMachine1 , patch .WithStatusObservedGeneration {})
176176 }, timeout ).Should (Succeed ())
177177 // Mark both Cluster and CloudStackCluster ready (v1beta2 readiness semantics).
178178 markClustersReady (ctx , g , testEnv .Client , dummies .CAPICluster , dummies .CSCluster )
@@ -215,13 +215,13 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
215215
216216 // Set node ref on CAPI machine to simulate that the machine is operational.
217217 g .Eventually (func () error {
218- ph , err := v1beta1patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
218+ ph , err := patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
219219 g .Expect (err ).ToNot (HaveOccurred ())
220220 dummies .CAPIMachine .Status .NodeRef = clusterv1.MachineNodeReference {
221221 Name : "test-node" ,
222222 }
223223
224- return ph .Patch (ctx , dummies .CAPIMachine , v1beta1patch .WithStatusObservedGeneration {})
224+ return ph .Patch (ctx , dummies .CAPIMachine , patch .WithStatusObservedGeneration {})
225225 }, timeout ).Should (Succeed ())
226226
227227 // Reconcile again (it is running).
@@ -317,13 +317,13 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
317317 g .Expect (testEnv .Create (ctx , dummies .CAPIMachine )).To (Succeed ())
318318 // Set the NodeRef on the CAPI machine to simulate that the machine is operational.
319319 g .Eventually (func () error {
320- ph , err := v1beta1patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
320+ ph , err := patch .NewHelper (dummies .CAPIMachine , testEnv .Client )
321321 g .Expect (err ).ToNot (HaveOccurred ())
322322 dummies .CAPIMachine .Status .NodeRef = clusterv1.MachineNodeReference {
323323 Name : "test-node" ,
324324 }
325325
326- return ph .Patch (ctx , dummies .CAPIMachine , v1beta1patch .WithStatusObservedGeneration {})
326+ return ph .Patch (ctx , dummies .CAPIMachine , patch .WithStatusObservedGeneration {})
327327 }, timeout ).Should (Succeed ())
328328 g .Expect (testEnv .Create (ctx , dummies .CSMachine1 )).To (Succeed ())
329329
@@ -335,7 +335,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
335335
336336 // Set owner ref from CAPI machine to CS machine and patch back the CS machine.
337337 g .Eventually (func () error {
338- ph , err := v1beta1patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
338+ ph , err := patch .NewHelper (dummies .CSMachine1 , testEnv .Client )
339339 g .Expect (err ).ToNot (HaveOccurred ())
340340 dummies .CSMachine1 .OwnerReferences = append (dummies .CSMachine1 .OwnerReferences , metav1.OwnerReference {
341341 Kind : "Machine" ,
@@ -352,7 +352,7 @@ func TestCloudStackMachineReconcilerIntegrationTests(t *testing.T) {
352352 dummies .CSMachine1 .Labels [infrav1 .FailureDomainLabelName ] =
353353 infrav1 .FailureDomainHashedMetaName (dummies .CSMachine1 .Spec .FailureDomainName , dummies .CAPICluster .Name )
354354
355- return ph .Patch (ctx , dummies .CSMachine1 , v1beta1patch .WithStatusObservedGeneration {})
355+ return ph .Patch (ctx , dummies .CSMachine1 , patch .WithStatusObservedGeneration {})
356356 }, timeout ).Should (Succeed ())
357357
358358 // Mark clusters ready (replaces setClusterReady & checkClusterReady).
0 commit comments