diff --git a/tests/pkg/tests/observability_dummy_ocp_test.go b/tests/pkg/tests/observability_dummy_ocp_test.go new file mode 100644 index 000000000..b9006c029 --- /dev/null +++ b/tests/pkg/tests/observability_dummy_ocp_test.go @@ -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()) + }) +})