Skip to content

Commit

Permalink
Fix test to align with controller-runtime changes
Browse files Browse the repository at this point in the history
  • Loading branch information
takahiro-yamada committed Oct 2, 2024
1 parent 8d9cb71 commit 9e25d40
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controllers/autovirtualdc_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/config"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

Expand All @@ -39,6 +40,9 @@ var _ = Describe("AutoVirtualDC controller", func() {
Scheme: scheme,
LeaderElection: false,
Metrics: metricsserver.Options{BindAddress: "0"},
Controller: config.Controller{
SkipNameValidation: ptr.To(true),
},
})
Expect(err).NotTo(HaveOccurred())

Expand Down
5 changes: 5 additions & 0 deletions controllers/virtualdc_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/config"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
)

Expand Down Expand Up @@ -73,6 +75,9 @@ var _ = Describe("VirtualDC controller", func() {
Scheme: scheme,
LeaderElection: false,
Metrics: metricsserver.Options{BindAddress: "0"},
Controller: config.Controller{
SkipNameValidation: ptr.To(true),
},
})
Expect(err).NotTo(HaveOccurred())

Expand Down

0 comments on commit 9e25d40

Please sign in to comment.