test: skip TLS profile e2e tests when APIServer is not writable - #2313
Conversation
|
Hi @unsortedhashsets. Thanks for your PR. I'm waiting for a istio-ecosystem or istio member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2313 +/- ##
==========================================
+ Coverage 87.91% 88.10% +0.18%
==========================================
Files 56 56
Lines 2665 2665
==========================================
+ Hits 2343 2348 +5
+ Misses 322 317 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The TLS profile tests update the cluster-scoped APIServer resource, which managed clusters (e.g. ROSA/OSD) reject via Red Hat SRE admission webhooks with a Forbidden error. Instead of enumerating cluster types, the tls-profile BeforeAll now probes writability directly with a no-op server-side dry-run update and skips on Forbidden, persisting nothing. This generalises the existing hosted-cluster guard and covers any cluster where the resource is not manageable, while self-managed OpenShift continues to run the tests. Signed-off-by: Mikhail Abramov <mabramov@redhat.com>
9f8c6bc to
5f5bc8f
Compare
What type of PR is this?
What this PR does / why we need it:
The TLS profile tests update the cluster-scoped
APIServerresource, which managed clusters (e.g. ROSA/OSD) reject via Red Hat SRE admission webhooks with aForbiddenerror. Instead of enumerating cluster types, thetls-profileBeforeAllnow probes writability directly with a no-op server-side dry-run update and skips onForbidden, persisting nothing. This generalises the existing hosted-cluster guard and covers any cluster where the resource is not manageable, while self-managed OpenShift continues to run the tests.Which issue(s) this PR fixes:
Fixes #
Related Issue/PR #
Additional information:
Verified on a live ROSA cluster: a no-op server-side dry-run
PUTof theAPIServerresource returnsadmission webhook "regular-user-validation.managed.openshift.io" denied the request(HTTP 403), so the probe hits theSkipbranch. On self-managed OpenShift the same dry-run succeeds and the tests run as before. OnlyForbiddentriggers the skip — any other error still fails the test.