File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,18 @@ import (
36
36
clientset "k8s.io/client-go/kubernetes"
37
37
"sigs.k8s.io/controller-runtime/pkg/client"
38
38
"sigs.k8s.io/controller-runtime/pkg/client/config"
39
+ "sigs.k8s.io/controller-runtime/pkg/log"
40
+ "sigs.k8s.io/controller-runtime/pkg/log/zap"
39
41
"sigs.k8s.io/yaml"
40
42
)
41
43
42
44
// DefaultOptions will parse command line flags to populate a
43
45
// ConformanceOptions struct. It will also initialize the various clients
44
46
// required by the tests.
45
47
func DefaultOptions (t * testing.T ) suite.ConformanceOptions {
48
+ // This line prevents controller-runtime from complaining about log.SetLogger never being called
49
+ log .SetLogger (zap .New (zap .WriteTo (os .Stdout ), zap .UseDevMode (true )))
50
+
46
51
cfg , err := config .GetConfig ()
47
52
require .NoError (t , err , "error loading Kubernetes config" )
48
53
clientOptions := client.Options {}
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ require (
35
35
github.com/fatih/color v1.18.0 // indirect
36
36
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
37
37
github.com/go-logr/logr v1.4.3 // indirect
38
+ github.com/go-logr/zapr v1.3.0 // indirect
38
39
github.com/go-openapi/jsonpointer v0.21.2 // indirect
39
40
github.com/go-openapi/jsonreference v0.21.0 // indirect
40
41
github.com/go-openapi/swag v0.23.1 // indirect
You can’t perform that action at this time.
0 commit comments