@@ -182,6 +182,9 @@ func TestAzureASOManagedClusterReconcile(t *testing.T) {
182182 clusterv1 .ClusterFinalizer ,
183183 },
184184 },
185+ Status : infrav1exp.AzureASOManagedClusterStatus {
186+ Ready : true ,
187+ },
185188 }
186189 c := fakeClientBuilder ().
187190 WithObjects (cluster , asoManagedCluster ).
@@ -205,6 +208,9 @@ func TestAzureASOManagedClusterReconcile(t *testing.T) {
205208 result , err := r .Reconcile (ctx , ctrl.Request {NamespacedName : client .ObjectKeyFromObject (asoManagedCluster )})
206209 g .Expect (err ).NotTo (HaveOccurred ())
207210 g .Expect (result ).To (Equal (ctrl.Result {}))
211+
212+ g .Expect (r .Get (ctx , client .ObjectKeyFromObject (asoManagedCluster ), asoManagedCluster )).To (Succeed ())
213+ g .Expect (asoManagedCluster .Status .Ready ).To (BeFalse ())
208214 })
209215
210216 t .Run ("successfully reconciles normally" , func (t * testing.T ) {
@@ -239,6 +245,9 @@ func TestAzureASOManagedClusterReconcile(t *testing.T) {
239245 clusterv1 .ClusterFinalizer ,
240246 },
241247 },
248+ Status : infrav1exp.AzureASOManagedClusterStatus {
249+ Ready : false ,
250+ },
242251 }
243252 asoManagedControlPlane := & infrav1exp.AzureASOManagedControlPlane {
244253 ObjectMeta : metav1.ObjectMeta {
@@ -268,6 +277,7 @@ func TestAzureASOManagedClusterReconcile(t *testing.T) {
268277
269278 g .Expect (c .Get (ctx , client .ObjectKeyFromObject (asoManagedCluster ), asoManagedCluster )).To (Succeed ())
270279 g .Expect (asoManagedCluster .Spec .ControlPlaneEndpoint .Host ).To (Equal ("endpoint" ))
280+ g .Expect (asoManagedCluster .Status .Ready ).To (BeTrue ())
271281 })
272282
273283 t .Run ("successfully reconciles pause" , func (t * testing.T ) {
0 commit comments