From 561ab0e48a8e8c28ce6893e7847f09c55516c140 Mon Sep 17 00:00:00 2001 From: Thibault Richard Date: Wed, 15 Dec 2021 16:36:39 +0100 Subject: [PATCH] Use logr.Discard() Relates to the breaking change https://github.com/go-logr/logr/pull/42 released in logr v1.0.0. --- pkg/controller/beat/common/config_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/controller/beat/common/config_test.go b/pkg/controller/beat/common/config_test.go index fe867f1cd1..a626f25511 100644 --- a/pkg/controller/beat/common/config_test.go +++ b/pkg/controller/beat/common/config_test.go @@ -13,7 +13,6 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/record" - "sigs.k8s.io/controller-runtime/pkg/log" beatv1beta1 "github.com/elastic/cloud-on-k8s/pkg/apis/beat/v1beta1" commonv1 "github.com/elastic/cloud-on-k8s/pkg/apis/common/v1" @@ -175,7 +174,7 @@ func Test_buildBeatConfig(t *testing.T) { gotYaml, gotErr := buildBeatConfig(DriverParams{ Client: tt.client, Context: nil, - Logger: logr.DiscardLogger{}, + Logger: logr.Discard(), Watches: watches.NewDynamicWatches(), EventRecorder: nil, Beat: tt.beat, @@ -369,7 +368,7 @@ func Test_getUserConfig(t *testing.T) { t.Run(tt.name, func(t *testing.T) { params := DriverParams{ Context: context.Background(), - Logger: log.NullLogger{}, + Logger: logr.Discard(), Client: tt.client, EventRecorder: &record.FakeRecorder{}, Watches: watches.NewDynamicWatches(),