From 21ce2beaee5c3fd92f8b0536a0907afcc07fec7d Mon Sep 17 00:00:00 2001 From: Christoph Mewes Date: Fri, 10 May 2024 12:01:53 +0200 Subject: [PATCH] silence warning about unset logger in e2e tests (#3183) --- test/e2e/helpers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/helpers.go b/test/e2e/helpers.go index 941a65f07..40d5eedf4 100644 --- a/test/e2e/helpers.go +++ b/test/e2e/helpers.go @@ -35,6 +35,7 @@ import ( "time" "github.com/Masterminds/semver/v3" + "github.com/go-logr/logr" "golang.org/x/text/cases" "golang.org/x/text/language" @@ -51,6 +52,7 @@ import ( "k8s.io/client-go/util/retry" k8spath "k8s.io/utils/path" ctrlruntimeclient "sigs.k8s.io/controller-runtime/pkg/client" + ctrlruntimelog "sigs.k8s.io/controller-runtime/pkg/log" ) const ( @@ -63,6 +65,8 @@ func init() { if err := clusterv1alpha1.AddToScheme(scheme.Scheme); err != nil { panic(err) } + + ctrlruntimelog.SetLogger(logr.Discard()) } func mustGetwd() string {