Skip to content

Commit

Permalink
Use logr.Discard()
Browse files Browse the repository at this point in the history
Relates to the breaking change go-logr/logr#42
released in logr v1.0.0.
  • Loading branch information
thbkrkr committed Dec 15, 2021
1 parent 8537de1 commit 561ab0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/controller/beat/common/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 561ab0e

Please sign in to comment.