Skip to content

Commit

Permalink
silence warning about unset logger in e2e tests (#3183)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrstf authored May 10, 2024
1 parent 515d7a3 commit 21ce2be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/e2e/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 (
Expand All @@ -63,6 +65,8 @@ func init() {
if err := clusterv1alpha1.AddToScheme(scheme.Scheme); err != nil {
panic(err)
}

ctrlruntimelog.SetLogger(logr.Discard())
}

func mustGetwd() string {
Expand Down

0 comments on commit 21ce2be

Please sign in to comment.