Add test coverage for ClusterProvider.Get and its unavailable path - #2356
magic-peach wants to merge 1 commit into
Conversation
ReasonClusterProfileUnavailable and ReasonRemoteClusterStale had no test coverage anywhere. Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: magic-peach The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @magic-peach. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This repo has no PR template, so this is a plain factual description.
What changed: added tests to pkg/reconciler/common/multicluster_test.go covering ClusterProvider.Get (cache miss, a stale cached entry, a live cached entry) and doRefresh's generic ClusterProfile Get API error path.
Why: docs/multicluster.md documents ReasonClusterProfileUnavailable and ReasonRemoteClusterStale as status conditions under TargetClusterResolved=False, but neither had any test coverage anywhere in the package.
How tested: go build ./... and go test on pkg/reconciler/common, all green, including the new tests and the existing suite. Rebuilt and retested against the current tip of main immediately before opening this PR.
Confirmed no existing issue or PR covers this.