@@ -828,6 +828,15 @@ var _ = Describe("TrustManager", Ordered, Label("Platform:Generic", "Feature:Tru
828828 const openshiftConfigNS = "openshift-config"
829829 const userCABundleName = "user-ca-bundle"
830830
831+ By ("checking if Proxy/cluster is writable (skipped on HyperShift/HostedCluster)" )
832+ proxy , err := configClient .Proxies ().Get (ctx , "cluster" , metav1.GetOptions {})
833+ Expect (err ).ShouldNot (HaveOccurred ())
834+ _ , err = configClient .Proxies ().Update (ctx , proxy , metav1.UpdateOptions {DryRun : []string {metav1 .DryRunAll }})
835+ if apierrors .IsForbidden (err ) || apierrors .IsInvalid (err ) {
836+ Skip ("Proxy/cluster is immutable on this cluster (likely HyperShift): " + err .Error ())
837+ }
838+ Expect (err ).ShouldNot (HaveOccurred ())
839+
831840 createTrustManager (ctx , newTrustManagerCR ().WithDefaultCAPackage (v1alpha1 .DefaultCAPackagePolicyEnabled ))
832841
833842 // --- Capture baseline state ---
@@ -862,7 +871,7 @@ var _ = Describe("TrustManager", Ordered, Label("Platform:Generic", "Feature:Tru
862871 // --- Save original Proxy and user-ca-bundle state for cleanup ---
863872
864873 By ("saving original Proxy trustedCA and user-ca-bundle state" )
865- proxy , err : = configClient .Proxies ().Get (ctx , "cluster" , metav1.GetOptions {})
874+ proxy , err = configClient .Proxies ().Get (ctx , "cluster" , metav1.GetOptions {})
866875 Expect (err ).ShouldNot (HaveOccurred ())
867876 originalTrustedCAName := proxy .Spec .TrustedCA .Name
868877
0 commit comments