Skip to content

Conversation

Diaphteiros
Copy link
Contributor

What this PR does / why we need it:
While trying to use the advanced clusteraccess library in the PlatformService DNS, I noticed some shortcomings regarding unit tests. This PR fixes that.

Which issue(s) this PR fixes:
None

Special notes for your reviewer:

Release note:

The advanced ClusterAccess library's capabilities regarding unit tests have been enhanced by adding a configurable `FakeClientGenerator` to the reconciler. If set, this function will be called when trying to build a `client.Client` out of an `AccessRequest`'s kubeconfig secret. This enables the test code to inject fake client implementations into the reconciler's `Access` method and thereby removes the need for any test-specific coding in the controller's logic itself.

@Diaphteiros Diaphteiros merged commit 637b58a into main Oct 17, 2025
5 checks passed
@Diaphteiros Diaphteiros deleted the improve-clusteraccess branch October 17, 2025 06:59
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