From d2a05f83a9dcab0f9fffb45dacb423836589c1ed Mon Sep 17 00:00:00 2001 From: YZ775 Date: Mon, 19 Aug 2024 08:33:22 +0000 Subject: [PATCH] support controller-runtime 0.19.0 --- controllers/mysqlcluster_controller_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/mysqlcluster_controller_test.go b/controllers/mysqlcluster_controller_test.go index 1efffdfa..611512be 100644 --- a/controllers/mysqlcluster_controller_test.go +++ b/controllers/mysqlcluster_controller_test.go @@ -27,6 +27,7 @@ import ( "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/config" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" ) @@ -111,9 +112,11 @@ var _ = Describe("MySQLCluster reconciler", func() { Metrics: metricsserver.Options{ BindAddress: "0", }, + Controller: config.Controller{ + SkipNameValidation: ptr.To(true), + }, }) Expect(err).ToNot(HaveOccurred()) - mockMgr = &mockManager{ clusters: make(map[string]struct{}), }