From 2f69a041a214c61c048d6fe8f5f8b18aad54bfdd Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Mon, 30 Mar 2026 12:22:18 +0100 Subject: [PATCH 1/4] Fix tests for CI Signed-off-by: Triona Doyle --- .../e2e/ginkgo/parallel/1-050_validate_sso_test.go | 7 +++++++ ...alternate_cluster_roles_cluster_scoped_instance_test.go | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go index 3835b98e105..4ff5f780c1a 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go @@ -66,6 +66,13 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { Skip("skipping this test as OCP version is less than 4.20") return } + + // also skip for CI + if strings.Contains(ocVersion, ".ci") { + Skip("skipping this test in CI because OIDC is not enabled by default") + return + } + ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() argoCD := &argov1beta1api.ArgoCD{ diff --git a/test/openshift/e2e/ginkgo/sequential/1-108_alternate_cluster_roles_cluster_scoped_instance_test.go b/test/openshift/e2e/ginkgo/sequential/1-108_alternate_cluster_roles_cluster_scoped_instance_test.go index 11ab49f1919..83a67407249 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-108_alternate_cluster_roles_cluster_scoped_instance_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-108_alternate_cluster_roles_cluster_scoped_instance_test.go @@ -64,7 +64,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { fixture.OutputDebugOnFail(ns) if testGitOpsNs != nil { - Expect(k8sClient.Delete(ctx, testGitOpsNs)).To(Succeed()) + err := k8sClient.Delete(ctx, testGitOpsNs) + Expect(client.IgnoreNotFound(err)).To(Succeed()) } if cleanupFunc != nil { From 131fee626053e0c7a00f28479811ae8f8fb69a55 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Mon, 30 Mar 2026 14:55:18 +0100 Subject: [PATCH 2/4] add skip for 1-050 > 4.20 Signed-off-by: Triona Doyle --- .../e2e/ginkgo/parallel/1-050_validate_sso_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go index 4ff5f780c1a..e0b651ed75b 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go @@ -62,14 +62,16 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { By("creating simple namespace-scoped Argo CD instance") ocVersion := getOCPVersion() Expect(ocVersion).ToNot(BeEmpty()) + + // Standard version check if ocVersion < "4.20" { Skip("skipping this test as OCP version is less than 4.20") return } - // also skip for CI - if strings.Contains(ocVersion, ".ci") { - Skip("skipping this test in CI because OIDC is not enabled by default") + // skip for CI environments if they are newer than 4.20. + if strings.Contains(ocVersion, ".ci") && !strings.HasPrefix(ocVersion, "4.20") { + Skip("skipping this test on CI clusters > 4.20 ") return } From 9427a382475d3d5420a6686381d80f250708ccf9 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Mon, 30 Mar 2026 15:16:46 +0100 Subject: [PATCH 3/4] Update the cleanup Signed-off-by: Triona Doyle --- .../e2e/ginkgo/parallel/1-050_validate_sso_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go index e0b651ed75b..e4db56a2559 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go @@ -51,27 +51,29 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { }) AfterEach(func() { - - fixture.OutputDebugOnFail(ns) + // try to output debug info only if the namespace was actually created + if ns != nil { + fixture.OutputDebugOnFail(ns) + } if cleanupFunc != nil { cleanupFunc() } }) + It("ensures the conditions in status when external Authentication is enabled on clusters; above 4.20 by default in openshit is enabled", func() { By("creating simple namespace-scoped Argo CD instance") ocVersion := getOCPVersion() Expect(ocVersion).ToNot(BeEmpty()) - // Standard version check if ocVersion < "4.20" { Skip("skipping this test as OCP version is less than 4.20") return } - // skip for CI environments if they are newer than 4.20. - if strings.Contains(ocVersion, ".ci") && !strings.HasPrefix(ocVersion, "4.20") { - Skip("skipping this test on CI clusters > 4.20 ") + // skip on ANY 4.21+ cluster (inc CI) + if strings.Contains(ocVersion, ".ci") || strings.HasPrefix(ocVersion, "4.21") { + Skip("skipping this test on CI or 4.21+ clusters") return } From 3855b5eeee70200c9cfa3b5871419ba1df665b33 Mon Sep 17 00:00:00 2001 From: Triona Doyle Date: Tue, 31 Mar 2026 09:25:34 +0100 Subject: [PATCH 4/4] Revert 1-050 and fixture changes (to be resolved in separate PR) Signed-off-by: Triona Doyle --- .../ginkgo/parallel/1-050_validate_sso_test.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go index e4db56a2559..3835b98e105 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go @@ -51,32 +51,21 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { }) AfterEach(func() { - // try to output debug info only if the namespace was actually created - if ns != nil { - fixture.OutputDebugOnFail(ns) - } + + fixture.OutputDebugOnFail(ns) if cleanupFunc != nil { cleanupFunc() } }) - It("ensures the conditions in status when external Authentication is enabled on clusters; above 4.20 by default in openshit is enabled", func() { By("creating simple namespace-scoped Argo CD instance") ocVersion := getOCPVersion() Expect(ocVersion).ToNot(BeEmpty()) - if ocVersion < "4.20" { Skip("skipping this test as OCP version is less than 4.20") return } - - // skip on ANY 4.21+ cluster (inc CI) - if strings.Contains(ocVersion, ".ci") || strings.HasPrefix(ocVersion, "4.21") { - Skip("skipping this test on CI or 4.21+ clusters") - return - } - ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() argoCD := &argov1beta1api.ArgoCD{