From 67e162d7bd460ece93e49adefb0118b98746c19a Mon Sep 17 00:00:00 2001 From: fabriziopandini Date: Thu, 22 Jun 2023 22:28:59 +0200 Subject: [PATCH] Fix test flake --- controlplane/kubeadm/internal/controllers/suite_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controlplane/kubeadm/internal/controllers/suite_test.go b/controlplane/kubeadm/internal/controllers/suite_test.go index 865f39ef5fcc..c3d10ccb2a23 100644 --- a/controlplane/kubeadm/internal/controllers/suite_test.go +++ b/controlplane/kubeadm/internal/controllers/suite_test.go @@ -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" ) @@ -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 }, })) }