diff --git a/controllers/openshift_controller_test.go b/controllers/openshift_controller_test.go index 53d73728..36a7e1d0 100644 --- a/controllers/openshift_controller_test.go +++ b/controllers/openshift_controller_test.go @@ -52,38 +52,6 @@ var _ = Describe("OpenShift KataConfig Controller", func() { By("Creating marking the second KataConfig CR correctly") Expect(kataconfig2.Status.InstallationStatus.Failed.FailedNodesCount).Should(Equal(-1)) }) - It("Should return master in combined master/worker cluster", func() { - const ( - name = "example-kataconfig" - ) - - kataconfig := &kataconfigurationv1.KataConfig{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "kataconfiguration.openshift.io/v1", - Kind: "KataConfig", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: name, - }, - } - - key := types.NamespacedName{ - Name: "example-kataconfig", - Namespace: "kata-operator-system", - } - - const timeout = time.Second * 30 - const interval = time.Second * 1 - - By("Creating the KataConfig CR successfully") - Expect(k8sClient.Create(context.Background(), kataconfig)).Should(Succeed()) - time.Sleep(time.Second * 5) - - exampleKataconfig := &kataconfigurationv1.KataConfig{} - Eventually(func() bool { - k8sClient.Get(context.Background(), key, exampleKataconfig) - return exampleKataconfig.Status.TotalNodesCount == exampleKataconfig.Status.InstallationStatus.Completed.CompletedNodesCount - }, timeout, interval).Should(BeTrue()) - }) }) + }) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 4c556b1c..9abfda76 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -17,7 +17,6 @@ limitations under the License. package controllers import ( - "os" "path/filepath" "testing" @@ -58,15 +57,8 @@ var _ = BeforeSuite(func(done Done) { logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) By("bootstrapping test environment") - t := true - if os.Getenv("TEST_USE_EXISTING_CLUSTER") == "true" { - testEnv = &envtest.Environment{ - UseExistingCluster: &t, - } - } else { - testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, - } + testEnv = &envtest.Environment{ + CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, } var err error