-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To see if this work fine. Signed-off-by: Jacob Baungard Hansen <[email protected]>
- Loading branch information
1 parent
e726cc6
commit f001645
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)", 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()) | ||
}) | ||
}) |