Skip to content

Commit

Permalink
Fix test flake
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Jun 22, 2023
1 parent 91fdaf0 commit 67e162d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion controlplane/kubeadm/internal/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ import (
"os"
"testing"

corev1 "k8s.io/api/core/v1"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

"sigs.k8s.io/cluster-api/internal/test/envtest"
)
Expand All @@ -32,7 +34,11 @@ var (

func TestMain(m *testing.M) {
os.Exit(envtest.Run(ctx, envtest.RunInput{
M: m,
M: m,
ManagerUncachedObjs: []client.Object{
&corev1.ConfigMap{},
&corev1.Secret{},
},
SetupEnv: func(e *envtest.Environment) { env = e },
}))
}

0 comments on commit 67e162d

Please sign in to comment.