From f5dee3f2e2623b86103523315174e5ada63a0ca5 Mon Sep 17 00:00:00 2001 From: Olivia Song Date: Wed, 29 May 2024 16:19:59 -0700 Subject: [PATCH] prevent controller runtime complaining about SetupLogger() was never called (#3724) --- test/framework/utils/log.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/framework/utils/log.go b/test/framework/utils/log.go index ef3981683..04aa79de6 100644 --- a/test/framework/utils/log.go +++ b/test/framework/utils/log.go @@ -2,6 +2,7 @@ package utils import ( "fmt" + logf "sigs.k8s.io/controller-runtime/pkg/log" httpexpectv2 "github.com/gavv/httpexpect/v2" "github.com/go-logr/logr" @@ -39,5 +40,7 @@ func NewGinkgoLogger() (logr.Logger, httpexpectv2.LoggerReporter) { zap.Level(zapraw.InfoLevel), zap.WriteTo(ginkgov2.GinkgoWriter), zap.Encoder(encoder)) + // this line is to prevent controller runtime complaining about SetupLogger() was never called + logf.SetLogger(logger) return logger, &defaultGinkgoLogger{logger: logger} }