Skip to content

Conversation

@Diaphteiros
Copy link
Contributor

What this PR does / why we need it:
See release notes.

Which issue(s) this PR fixes:
Required for unit tests belonging to openmcp-project/backlog#95

Special notes for your reviewer:

Release note:

The `StableRequestName` and `StableRequestNameFromLocalName` functions from the `lib/clusteraccess` package now shorten resulting names if they exceed the character limit for k8s resource names. A hash suffix prevents conflicts for different keys with the same prefix.
The `NewTestClusterAccessManager` function from `lib/accessrequest` serves as an implementation of the `Manager` interface that is suited to be used in unit tests. It fakes readiness of `ClusterRequest` and `AccessRequest` resources that it creates and returns k8s fake clients instead. The fake clients have to be configured before. While this makes the `Manager` usable in unit tests, the code creating the `Manager` still has to differentiate between the creation of a regular one or the test implementation.

@Diaphteiros Diaphteiros merged commit de9cd02 into main Sep 18, 2025
5 checks passed
@Diaphteiros Diaphteiros deleted the improve-clusteraccess branch September 18, 2025 11:38
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.

3 participants