Skip to content

Commit

Permalink
enable controller SkipNameValidation in test
Browse files Browse the repository at this point in the history
  • Loading branch information
defo89 committed Sep 13, 2024
1 parent df7f376 commit 0901640
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/controller/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
"testing"
"time"

"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/config"

"github.com/ironcore-dev/metal-operator/internal/registry"

"github.com/ironcore-dev/metal-operator/internal/api/macdb"
Expand Down Expand Up @@ -122,6 +125,11 @@ func SetupTest() *corev1.Namespace {

k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{
Scheme: scheme.Scheme,
Controller: config.Controller{
// need to skip unique controller name validation
// since all tests need a dedicated controller
SkipNameValidation: ptr.To(true),
},
})
Expect(err).ToNot(HaveOccurred())

Expand Down

0 comments on commit 0901640

Please sign in to comment.