Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend pull secret controller unit test to cover Degraded status cond… #4007

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lbossis
Copy link
Collaborator

@lbossis lbossis commented Dec 12, 2024

Which issue this PR addresses:

https://issues.redhat.com/browse/ARO-13079

What this PR does / why we need it:

Extend pull secret controller unit tests with negative unit test case so that we know the controller's Reconcile function sets the appropriate controller state in response to function failure, which is expected to cause controller to enter a Degraded state. Potentially, an approach of Reconcile function failures on-demand for client.Client attempts to Update k8s objects can be re-used for other controllers.

Test plan for issue:

[x] Unit Test Cases
[] Local Cluster Creation
[] CI
[] E2E

Are there unit tests?

Yes, https://github.com/Azure/ARO-RP/blob/master/pkg/operator/controllers/pullsecret/pullsecret_controller_test.go

How do you know this will function as expected in production?

Running all unit tests locally and verifying their output

Is there any documentation that needs to be updated for this PR?

N/A

Copy link
Contributor

@kimorris27 kimorris27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM! I suggested a change to a log statement and gave a suggestion on how to fix the lint error.

pkg/util/pullsecret/pullsecret.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants