@@ -227,7 +227,7 @@ func TestMCPOIDCConfigReconciler_ValidationRecovery(t *testing.T) {
227227 },
228228 }
229229
230- // Reconcile invalid config — should set Valid =False
230+ // Reconcile invalid config — should set Ready =False
231231 _ , err := r .Reconcile (ctx , req )
232232 require .NoError (t , err )
233233
@@ -237,12 +237,12 @@ func TestMCPOIDCConfigReconciler_ValidationRecovery(t *testing.T) {
237237
238238 var foundFalse bool
239239 for _ , cond := range invalidConfig .Status .Conditions {
240- if cond .Type == conditionTypeValid {
240+ if cond .Type == mcpv1alpha1 . ConditionTypeOIDCConfigReady {
241241 assert .Equal (t , metav1 .ConditionFalse , cond .Status )
242242 foundFalse = true
243243 }
244244 }
245- require .True (t , foundFalse , "Should have Valid =False condition" )
245+ require .True (t , foundFalse , "Should have Ready =False condition" )
246246 assert .Empty (t , invalidConfig .Status .ConfigHash , "Hash should not be set for invalid config" )
247247
248248 // Fix the config by adding the inline spec
@@ -254,7 +254,7 @@ func TestMCPOIDCConfigReconciler_ValidationRecovery(t *testing.T) {
254254 err = fakeClient .Update (ctx , & invalidConfig )
255255 require .NoError (t , err )
256256
257- // Reconcile again — should set Valid =True and compute hash
257+ // Reconcile again — should set Ready =True and compute hash
258258 _ , err = r .Reconcile (ctx , req )
259259 require .NoError (t , err )
260260
@@ -264,13 +264,13 @@ func TestMCPOIDCConfigReconciler_ValidationRecovery(t *testing.T) {
264264
265265 var foundTrue bool
266266 for _ , cond := range recoveredConfig .Status .Conditions {
267- if cond .Type == conditionTypeValid {
268- assert .Equal (t , metav1 .ConditionTrue , cond .Status , "Valid condition should recover to True" )
269- assert .Equal (t , "ValidationSucceeded" , cond .Reason )
267+ if cond .Type == mcpv1alpha1 . ConditionTypeOIDCConfigReady {
268+ assert .Equal (t , metav1 .ConditionTrue , cond .Status , "Ready condition should recover to True" )
269+ assert .Equal (t , mcpv1alpha1 . ConditionReasonOIDCConfigValid , cond .Reason )
270270 foundTrue = true
271271 }
272272 }
273- assert .True (t , foundTrue , "Should have Valid =True condition after fix" )
273+ assert .True (t , foundTrue , "Should have Ready =True condition after fix" )
274274 assert .NotEmpty (t , recoveredConfig .Status .ConfigHash , "Hash should be set after recovery" )
275275}
276276
@@ -461,21 +461,21 @@ func TestMCPOIDCConfigReconciler_ValidationFailureSetsCondition(t *testing.T) {
461461 _ , err := r .Reconcile (ctx , req )
462462 require .NoError (t , err )
463463
464- // Check that the Valid condition is set to False
464+ // Check that the Ready condition is set to False
465465 var updatedConfig mcpv1alpha1.MCPOIDCConfig
466466 err = fakeClient .Get (ctx , req .NamespacedName , & updatedConfig )
467467 require .NoError (t , err )
468468
469469 var foundCondition bool
470470 for _ , cond := range updatedConfig .Status .Conditions {
471- if cond .Type == conditionTypeValid {
471+ if cond .Type == mcpv1alpha1 . ConditionTypeOIDCConfigReady {
472472 foundCondition = true
473- assert .Equal (t , metav1 .ConditionFalse , cond .Status , "Valid condition should be False" )
474- assert .Equal (t , "ValidationFailed" , cond .Reason )
473+ assert .Equal (t , metav1 .ConditionFalse , cond .Status , "Ready condition should be False" )
474+ assert .Equal (t , mcpv1alpha1 . ConditionReasonOIDCConfigInvalid , cond .Reason )
475475 break
476476 }
477477 }
478- assert .True (t , foundCondition , "Should have a Valid condition" )
478+ assert .True (t , foundCondition , "Should have a Ready condition" )
479479}
480480
481481func TestMCPOIDCConfig_Validate (t * testing.T ) {
0 commit comments