@@ -737,17 +737,13 @@ var _ = Describe("ClusterProfile: Reconciler", func() {
737
737
})
738
738
739
739
It ("updateClusterSummaries creates ClusterSummary for each matching CAPI Cluster" , func () {
740
- cpMachine := & clusterv1.Machine {
741
- ObjectMeta : metav1.ObjectMeta {
742
- Namespace : matchingCluster .Namespace ,
743
- Name : matchingCluster .Name ,
744
- Labels : map [string ]string {
745
- clusterv1 .ClusterNameLabel : matchingCluster .Name ,
746
- clusterv1 .MachineControlPlaneLabel : "ok" ,
747
- },
740
+ matchingCluster .Status .Conditions = []clusterv1.Condition {
741
+ {
742
+ Type : clusterv1 .ControlPlaneInitializedCondition ,
743
+ Status : corev1 .ConditionTrue ,
748
744
},
749
745
}
750
- cpMachine .Status .SetTypedPhase ( clusterv1 . MachinePhaseRunning )
746
+ nonMatchingCluster .Status .Conditions = matchingCluster . Status . Conditions
751
747
752
748
clusterProfile .Status .MatchingClusterRefs = []corev1.ObjectReference {
753
749
{
@@ -761,7 +757,6 @@ var _ = Describe("ClusterProfile: Reconciler", func() {
761
757
clusterProfile ,
762
758
nonMatchingCluster ,
763
759
matchingCluster ,
764
- cpMachine ,
765
760
}
766
761
767
762
c := fake .NewClientBuilder ().WithScheme (scheme ).WithStatusSubresource (initObjects ... ).WithObjects (initObjects ... ).Build ()
@@ -795,17 +790,12 @@ var _ = Describe("ClusterProfile: Reconciler", func() {
795
790
})
796
791
797
792
It ("updateClusterSummaries updates existing ClusterSummary for each matching CAPI Cluster" , func () {
798
- cpMachine := & clusterv1.Machine {
799
- ObjectMeta : metav1.ObjectMeta {
800
- Namespace : matchingCluster .Namespace ,
801
- Name : matchingCluster .Name ,
802
- Labels : map [string ]string {
803
- clusterv1 .ClusterNameLabel : matchingCluster .Name ,
804
- clusterv1 .MachineControlPlaneLabel : "ok" ,
805
- },
793
+ matchingCluster .Status .Conditions = []clusterv1.Condition {
794
+ {
795
+ Type : clusterv1 .ControlPlaneInitializedCondition ,
796
+ Status : corev1 .ConditionTrue ,
806
797
},
807
798
}
808
- cpMachine .Status .SetTypedPhase (clusterv1 .MachinePhaseRunning )
809
799
810
800
clusterProfile .Status .MatchingClusterRefs = []corev1.ObjectReference {
811
801
{
@@ -853,7 +843,6 @@ var _ = Describe("ClusterProfile: Reconciler", func() {
853
843
nonMatchingCluster ,
854
844
matchingCluster ,
855
845
clusterSummary ,
856
- cpMachine ,
857
846
}
858
847
859
848
c := fake .NewClientBuilder ().WithScheme (scheme ).WithStatusSubresource (initObjects ... ).WithObjects (initObjects ... ).Build ()
0 commit comments