Skip to content

Commit

Permalink
fix envtest setup flake
Browse files Browse the repository at this point in the history
  • Loading branch information
nojnhuh committed Dec 30, 2023
1 parent 1792fd4 commit a819d57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/test/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

var (
Expand Down Expand Up @@ -102,6 +103,9 @@ func NewTestEnvironment() *TestEnvironment {

mgr, err := manager.New(env.Config, manager.Options{
Scheme: scheme,
Metrics: server.Options{
BindAddress: "0",
},

Check warning on line 108 in internal/test/env/env.go

View check run for this annotation

Codecov / codecov/patch

internal/test/env/env.go#L106-L108

Added lines #L106 - L108 were not covered by tests
})
if err != nil {
klog.Fatalf("Failed to start testenv manager: %v", err)
Expand Down

0 comments on commit a819d57

Please sign in to comment.