From f809050398ecccc017fde80f1e138e84b4d13f76 Mon Sep 17 00:00:00 2001
From: Jestin Woods <jestin.woods@crowdstrike.com>
Date: Thu, 30 Nov 2023 09:11:37 -0800
Subject: [PATCH] fix tests

---
 controllers/suite/common.go | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/controllers/suite/common.go b/controllers/suite/common.go
index f4b7853f3..93234a8f3 100644
--- a/controllers/suite/common.go
+++ b/controllers/suite/common.go
@@ -284,12 +284,6 @@ func CreateAndBootstrapCluster(ctx context.Context, k8sClient client.Client, hum
 		}
 	}
 
-	bootstrapToken := kubernetes.ConstructHumioBootstrapToken(key.Name, key.Namespace)
-	bootstrapTokenKey := types.NamespacedName{
-		Namespace: bootstrapToken.Namespace,
-		Name:      bootstrapToken.Name,
-	}
-
 	if os.Getenv("TEST_USE_EXISTING_CLUSTER") != "true" {
 		// Simulate sidecar creating the secret which contains the admin token used to authenticate with humio
 		secretData := map[string][]byte{"token": []byte("")}
@@ -341,7 +335,7 @@ func CreateAndBootstrapCluster(ctx context.Context, k8sClient client.Client, hum
 		if len(hbtList) == 0 {
 			return fmt.Errorf("no humiobootstraptokens for cluster %s", key.Name)
 		}
-		if len(hbtList) > 0 {
+		if len(hbtList) > 1 {
 			return fmt.Errorf("too many humiobootstraptokens for cluster %s. found list : %+v", key.Name, hbtList)
 		}