@@ -26,9 +26,7 @@ import (
2626 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2727 "k8s.io/apimachinery/pkg/types"
2828 "k8s.io/klog/v2/textlogger"
29-
30- //nolint:staticcheck // SA1019: We are unable to update the dependency at this time.
31- clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta1"
29+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
3230 "sigs.k8s.io/controller-runtime/pkg/client"
3331 "sigs.k8s.io/controller-runtime/pkg/client/fake"
3432
@@ -46,16 +44,20 @@ var _ = Describe("Cluster utils", func() {
4644 BeforeEach (func () {
4745 namespace = "cluster-utils" + randomString ()
4846
47+ paused := true
48+ initialized := true
4949 cluster = & clusterv1.Cluster {
5050 ObjectMeta : metav1.ObjectMeta {
5151 Name : randomString (),
5252 Namespace : namespace ,
5353 },
5454 Spec : clusterv1.ClusterSpec {
55- Paused : true ,
55+ Paused : & paused ,
5656 },
5757 Status : clusterv1.ClusterStatus {
58- ControlPlaneReady : true ,
58+ Initialization : clusterv1.ClusterInitializationStatus {
59+ ControlPlaneInitialized : & initialized ,
60+ },
5961 },
6062 }
6163
@@ -93,7 +95,7 @@ var _ = Describe("Cluster utils", func() {
9395
9496 It ("IsClusterPaused returns false when Spec.Paused is set to false" , func () {
9597 paused := false
96- cluster .Spec .Paused = paused
98+ cluster .Spec .Paused = & paused
9799 sveltosCluster .Spec .Paused = paused
98100 initObjects := []client.Object {
99101 cluster , sveltosCluster ,
@@ -541,6 +543,7 @@ var _ = Describe("Cluster utils", func() {
541543
542544 onboardAnnotation := randomString ()
543545
546+ initialized := true
544547 matchingCapiCluster := & clusterv1.Cluster {
545548 ObjectMeta : metav1.ObjectMeta {
546549 Name : randomString (),
@@ -551,7 +554,9 @@ var _ = Describe("Cluster utils", func() {
551554 },
552555 },
553556 Status : clusterv1.ClusterStatus {
554- ControlPlaneReady : true ,
557+ Initialization : clusterv1.ClusterInitializationStatus {
558+ ControlPlaneInitialized : & initialized ,
559+ },
555560 },
556561 }
557562
@@ -563,7 +568,9 @@ var _ = Describe("Cluster utils", func() {
563568 Annotations : map [string ]string {},
564569 },
565570 Status : clusterv1.ClusterStatus {
566- ControlPlaneReady : true ,
571+ Initialization : clusterv1.ClusterInitializationStatus {
572+ ControlPlaneInitialized : & initialized ,
573+ },
567574 },
568575 }
569576
0 commit comments