Skip to content

Commit 69fb76f

Browse files
committed
skip name validation
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 88c3bed commit 69fb76f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

controllers/intergration_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ import (
2828
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2929
"k8s.io/apimachinery/pkg/runtime"
3030
"k8s.io/klog/v2"
31+
"k8s.io/utils/ptr"
3132
ctrl "sigs.k8s.io/controller-runtime"
3233
"sigs.k8s.io/controller-runtime/pkg/client"
34+
"sigs.k8s.io/controller-runtime/pkg/config"
3335
"sigs.k8s.io/controller-runtime/pkg/envtest"
3436
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
3537

@@ -91,6 +93,11 @@ func setupControllersAPIServerAndClient(t *testing.T, parentCtx context.Context,
9193
Metrics: server.Options{
9294
BindAddress: "0",
9395
},
96+
Controller: config.Controller{
97+
// need to skip unique controller name validation
98+
// since all tests need a dedicated controller
99+
SkipNameValidation: ptr.To(true),
100+
},
94101
})
95102
require.NoError(t, err)
96103

0 commit comments

Comments
 (0)