fix: add ready condition to OAuth2ClientStatus (#122)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright © 2022 Ory Corp
|
||||
// Copyright © 2023 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright © 2022 Ory Corp
|
||||
// Copyright © 2023 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package controllers
|
||||
@ -357,12 +357,24 @@ func (r *OAuth2ClientReconciler) updateReconciliationStatusError(ctx context.Con
|
||||
Code: code,
|
||||
Description: err.Error(),
|
||||
}
|
||||
c.Status.Conditions = []hydrav1alpha1.OAuth2ClientCondition{
|
||||
{
|
||||
Type: hydrav1alpha1.OAuth2ClientConditionReady,
|
||||
Status: hydrav1alpha1.ConditionFalse,
|
||||
},
|
||||
}
|
||||
|
||||
return r.updateClientStatus(ctx, c)
|
||||
}
|
||||
|
||||
func (r *OAuth2ClientReconciler) ensureEmptyStatusError(ctx context.Context, c *hydrav1alpha1.OAuth2Client) error {
|
||||
c.Status.ReconciliationError = hydrav1alpha1.ReconciliationError{}
|
||||
c.Status.Conditions = []hydrav1alpha1.OAuth2ClientCondition{
|
||||
{
|
||||
Type: hydrav1alpha1.OAuth2ClientConditionReady,
|
||||
Status: hydrav1alpha1.ConditionTrue,
|
||||
},
|
||||
}
|
||||
return r.updateClientStatus(ctx, c)
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright © 2022 Ory Corp
|
||||
// Copyright © 2023 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package controllers_test
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright © 2022 Ory Corp
|
||||
// Copyright © 2023 Ory Corp
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package controllers_test
|
||||
|
Reference in New Issue
Block a user