Skip to content

Commit

Permalink
Dummy OCP-required test
Browse files Browse the repository at this point in the history
To see if this work fine.

Signed-off-by: Jacob Baungard Hansen <[email protected]>
  • Loading branch information
jacobbaungard committed Dec 2, 2024
1 parent e726cc6 commit 254aab1
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions tests/pkg/tests/observability_dummy_ocp_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// Copyright (c) Red Hat, Inc.
// Copyright Contributors to the Open Cluster Management project
// Licensed under the Apache License 2.0

package tests

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"

"github.com/stolostron/multicluster-observability-operator/tests/pkg/utils"
)

var _ = Describe("Observability:", func() {
BeforeEach(func() {
hubClient = utils.NewKubeClient(
testOptions.HubCluster.ClusterServerURL,
testOptions.KubeConfig,
testOptions.HubCluster.KubeContext)

dynClient = utils.NewKubeClientDynamic(
testOptions.HubCluster.ClusterServerURL,
testOptions.KubeConfig,
testOptions.HubCluster.KubeContext)
})

JustBeforeEach(func() {
Eventually(func() error {
clusters, clusterError = utils.ListManagedClusters(testOptions)
if clusterError != nil {
return clusterError
}
return nil
}, EventuallyTimeoutMinute*6, EventuallyIntervalSecond*5).Should(Succeed())
})

It("[P2][Sev2][observability][Integration] DUMMY OCP TEST (requires-ocp/g0 manifestwork/g0)", func() {
By("Checking Required CRDs are created")
Eventually(func() error {
return utils.HaveCRDs(testOptions.HubCluster, testOptions.KubeConfig,
[]string{
"consoles.config.openshift.io",
})
}).Should(Succeed())
})

JustAfterEach(func() {
if CurrentGinkgoTestDescription().Failed {
utils.LogFailingTestStandardDebugInfo(testOptions)
}
testFailed = testFailed || CurrentGinkgoTestDescription().Failed
})

AfterEach(func() {
Expect(utils.CleanExportResources(testOptions)).NotTo(HaveOccurred())
Expect(utils.IntegrityChecking(testOptions)).NotTo(HaveOccurred())
})
})

0 comments on commit 254aab1

Please sign in to comment.