Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jswoods committed Nov 30, 2023
1 parent a887b11 commit f809050
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions controllers/suite/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("")}
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit f809050

Please sign in to comment.