Skip to content

Commit 9427a38

Browse files
author
Triona Doyle
committed
Update the cleanup
Signed-off-by: Triona Doyle <bot@example.com>
1 parent 131fee6 commit 9427a38

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

test/openshift/e2e/ginkgo/parallel/1-050_validate_sso_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,29 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
5151
})
5252

5353
AfterEach(func() {
54-
55-
fixture.OutputDebugOnFail(ns)
54+
// try to output debug info only if the namespace was actually created
55+
if ns != nil {
56+
fixture.OutputDebugOnFail(ns)
57+
}
5658

5759
if cleanupFunc != nil {
5860
cleanupFunc()
5961
}
6062
})
63+
6164
It("ensures the conditions in status when external Authentication is enabled on clusters; above 4.20 by default in openshit is enabled", func() {
6265
By("creating simple namespace-scoped Argo CD instance")
6366
ocVersion := getOCPVersion()
6467
Expect(ocVersion).ToNot(BeEmpty())
6568

66-
// Standard version check
6769
if ocVersion < "4.20" {
6870
Skip("skipping this test as OCP version is less than 4.20")
6971
return
7072
}
7173

72-
// skip for CI environments if they are newer than 4.20.
73-
if strings.Contains(ocVersion, ".ci") && !strings.HasPrefix(ocVersion, "4.20") {
74-
Skip("skipping this test on CI clusters > 4.20 ")
74+
// skip on ANY 4.21+ cluster (inc CI)
75+
if strings.Contains(ocVersion, ".ci") || strings.HasPrefix(ocVersion, "4.21") {
76+
Skip("skipping this test on CI or 4.21+ clusters")
7577
return
7678
}
7779

0 commit comments

Comments
 (0)