Skip to content

Commit

Permalink
Add logic for namespace cleanup and Serial
Browse files Browse the repository at this point in the history
  • Loading branch information
sebrandon1 committed Feb 24, 2025
1 parent de03725 commit 4307a7a
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/redhat-best-practices-for-k8s/certsuite-qe/tests/utils/pod"
)

var _ = Describe("Operator single-or-multi-namespaced-allowed-in-tenant-namespaces", func() {
var _ = Describe("Operator single-or-multi-namespaced-allowed-in-tenant-namespaces", Serial, func() {
var randomNamespace string
var randomReportDir string
var randomCertsuiteConfigDir string
Expand Down Expand Up @@ -277,10 +277,19 @@ func installClusterWideOperator() {
openshiftLoggingNamespace = "cluster-logging"
)

By("Preemptively delete the namespace if it already exists")
err := globalhelper.DeleteNamespaceAndWait(openshiftLoggingNamespace, tsparams.Timeout)
Expect(err).ToNot(HaveOccurred(), "Error deleting namespace "+openshiftLoggingNamespace)

By("Create openshift-logging namespace")
err := globalhelper.CreateNamespace(openshiftLoggingNamespace)
err = globalhelper.CreateNamespace(openshiftLoggingNamespace)
Expect(err).ToNot(HaveOccurred())

DeferCleanup(func() {
err := globalhelper.DeleteNamespaceAndWait(openshiftLoggingNamespace, tsparams.Timeout)
Expect(err).ToNot(HaveOccurred(), "Error deleting namespace "+openshiftLoggingNamespace)
})

By("Create fake operator group for cluster-logging operator")
err = tshelper.DeployTestOperatorGroup(openshiftLoggingNamespace, true)
Expect(err).ToNot(HaveOccurred(), "Error deploying operator group")
Expand Down

0 comments on commit 4307a7a

Please sign in to comment.