Skip to content

Add test coverage for ClusterProvider.Get and its unavailable path - #2356

Open
magic-peach wants to merge 1 commit into
knative:mainfrom
magic-peach:test/cluster-provider-get-coverage
Open

magic-peach wants to merge 1 commit into
knative:mainfrom
magic-peach:test/cluster-provider-get-coverage

Conversation

@magic-peach

Copy link
Copy Markdown

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.

ReasonClusterProfileUnavailable and ReasonRemoteClusterStale had no test coverage anywhere.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@knative-prow

knative-prow Bot commented Sep 18, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: magic-peach
Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 18, 2026
@knative-prow

knative-prow Bot commented Sep 18, 2026

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@knative-prow
knative-prow Bot requested review from houshengbo and matzew September 18, 2026 09:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant