From bb21061b73961c3e9d439e3a402177f47f9be2b6 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Thu, 23 Apr 2026 14:47:42 +0200 Subject: [PATCH 1/2] tests: Skip TLS profile change test when is executed on Hosted clusters There are failures when the test is executed on hosted cluster because by default changing the TLS profile Signed-off-by: Francisco Herrera --- tests/e2e/operator/operator_install_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/e2e/operator/operator_install_test.go b/tests/e2e/operator/operator_install_test.go index 76c714417d..21ac92b659 100644 --- a/tests/e2e/operator/operator_install_test.go +++ b/tests/e2e/operator/operator_install_test.go @@ -230,6 +230,14 @@ spec: Skip("Skipping OpenShift-specific tests on non-OpenShift cluster") } + Step("Checking if this is a Hosted Cluster") + infra := &configv1.Infrastructure{} + infraErr := cl.Get(ctx, client.ObjectKey{Name: "cluster"}, infra) + Expect(infraErr).NotTo(HaveOccurred(), "Failed to get Infrastructure resource") + if infra.Status.ControlPlaneTopology == configv1.ExternalTopologyMode { + Skip("Skipping TLS profile tests on hosted cluster: APIServer resource is read-only on hosted clusters") + } + Step("Determining OpenShift version") cv := &configv1.ClusterVersion{} err := cl.Get(ctx, client.ObjectKey{Name: "version"}, cv) From 22fb5b004a5147a0e93802f280b721f0c18d4615 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Thu, 23 Apr 2026 14:49:20 +0200 Subject: [PATCH 2/2] Adding comment Adding comment to let folks to know the reason of the skip Signed-off-by: Francisco Herrera --- tests/e2e/operator/operator_install_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/e2e/operator/operator_install_test.go b/tests/e2e/operator/operator_install_test.go index 21ac92b659..ea0fc834ba 100644 --- a/tests/e2e/operator/operator_install_test.go +++ b/tests/e2e/operator/operator_install_test.go @@ -230,6 +230,8 @@ spec: Skip("Skipping OpenShift-specific tests on non-OpenShift cluster") } + // On hosted clusters, the APIServer resource is read-only and TLS settings cannot be changed, + // so skip all TLS profile tests. If the test run in a regular cluster, the APIServer resource is writable and the tests can run as normal. Step("Checking if this is a Hosted Cluster") infra := &configv1.Infrastructure{} infraErr := cl.Get(ctx, client.ObjectKey{Name: "cluster"}, infra)