From 1e4f7c305a3149d426dc040d9389a20c4ea2b6de Mon Sep 17 00:00:00 2001 From: Gemma Hou Date: Fri, 16 Aug 2024 04:07:30 +0000 Subject: [PATCH] register direct controllers for kccmanager test --- config/tests/samples/create/samples_test.go | 4 +++- pkg/controller/kccmanager/kccmanager.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/tests/samples/create/samples_test.go b/config/tests/samples/create/samples_test.go index 70007d61d7..ec3c2c6225 100644 --- a/config/tests/samples/create/samples_test.go +++ b/config/tests/samples/create/samples_test.go @@ -26,10 +26,12 @@ import ( testgcp "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/gcp" testmain "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/main" - _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/register" "golang.org/x/sync/semaphore" klog "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" + + // Register direct controllers + _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/register" ) func init() { diff --git a/pkg/controller/kccmanager/kccmanager.go b/pkg/controller/kccmanager/kccmanager.go index 40cfb846ef..d53697ec0a 100644 --- a/pkg/controller/kccmanager/kccmanager.go +++ b/pkg/controller/kccmanager/kccmanager.go @@ -42,7 +42,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" // Register direct controllers - _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct" + _ "github.com/GoogleCloudPlatform/k8s-config-connector/pkg/controller/direct/register" ) type Config struct {