@@ -13,6 +13,7 @@ import (
13
13
operatorv1beta1 "github.com/kong/kubernetes-configuration/v2/api/gateway-operator/v1beta1"
14
14
operatorv2alpha1 "github.com/kong/kubernetes-configuration/v2/api/gateway-operator/v2alpha1"
15
15
16
+ gwtypes "github.com/kong/kong-operator/internal/types"
16
17
"github.com/kong/kong-operator/modules/manager/scheme"
17
18
)
18
19
@@ -266,8 +267,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
266
267
Name : "test-cp" ,
267
268
Namespace : "cp-ns" ,
268
269
},
269
- Spec : operatorv2alpha1 .ControlPlaneSpec {
270
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
270
+ Spec : gwtypes .ControlPlaneSpec {
271
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
271
272
WatchNamespaces : nil ,
272
273
},
273
274
},
@@ -282,8 +283,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
282
283
Name : "test-cp" ,
283
284
Namespace : "cp-ns" ,
284
285
},
285
- Spec : operatorv2alpha1 .ControlPlaneSpec {
286
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
286
+ Spec : gwtypes .ControlPlaneSpec {
287
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
287
288
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
288
289
Type : operatorv2alpha1 .WatchNamespacesTypeAll ,
289
290
},
@@ -300,8 +301,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
300
301
Name : "test-cp" ,
301
302
Namespace : "cp-ns" ,
302
303
},
303
- Spec : operatorv2alpha1 .ControlPlaneSpec {
304
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
304
+ Spec : gwtypes .ControlPlaneSpec {
305
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
305
306
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
306
307
Type : operatorv2alpha1 .WatchNamespacesTypeAll ,
307
308
},
@@ -319,8 +320,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
319
320
Name : "test-cp" ,
320
321
Namespace : "cp-ns" ,
321
322
},
322
- Spec : operatorv2alpha1 .ControlPlaneSpec {
323
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
323
+ Spec : gwtypes .ControlPlaneSpec {
324
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
324
325
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
325
326
Type : operatorv2alpha1 .WatchNamespacesTypeOwn ,
326
327
},
@@ -337,8 +338,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
337
338
Name : "test-cp" ,
338
339
Namespace : "cp-ns" ,
339
340
},
340
- Spec : operatorv2alpha1 .ControlPlaneSpec {
341
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
341
+ Spec : gwtypes .ControlPlaneSpec {
342
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
342
343
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
343
344
Type : operatorv2alpha1 .WatchNamespacesTypeOwn ,
344
345
},
@@ -355,8 +356,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
355
356
Name : "test-cp" ,
356
357
Namespace : "cp-ns" ,
357
358
},
358
- Spec : operatorv2alpha1 .ControlPlaneSpec {
359
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
359
+ Spec : gwtypes .ControlPlaneSpec {
360
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
360
361
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
361
362
Type : operatorv2alpha1 .WatchNamespacesTypeOwn ,
362
363
},
@@ -374,8 +375,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
374
375
Name : "test-cp" ,
375
376
Namespace : "cp-ns" ,
376
377
},
377
- Spec : operatorv2alpha1 .ControlPlaneSpec {
378
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
378
+ Spec : gwtypes .ControlPlaneSpec {
379
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
379
380
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
380
381
Type : operatorv2alpha1 .WatchNamespacesTypeList ,
381
382
List : []string {"ns1" , "ns2" },
@@ -393,8 +394,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
393
394
Name : "test-cp" ,
394
395
Namespace : "cp-ns" ,
395
396
},
396
- Spec : operatorv2alpha1 .ControlPlaneSpec {
397
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
397
+ Spec : gwtypes .ControlPlaneSpec {
398
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
398
399
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
399
400
Type : operatorv2alpha1 .WatchNamespacesTypeList ,
400
401
List : []string {"ns1" , "ns2" },
@@ -412,8 +413,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
412
413
Name : "test-cp" ,
413
414
Namespace : "cp-ns" ,
414
415
},
415
- Spec : operatorv2alpha1 .ControlPlaneSpec {
416
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
416
+ Spec : gwtypes .ControlPlaneSpec {
417
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
417
418
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
418
419
Type : operatorv2alpha1 .WatchNamespacesTypeList ,
419
420
List : []string {"ns1" , "ns2" , "ns3" },
@@ -432,8 +433,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
432
433
Name : "test-cp" ,
433
434
Namespace : "cp-ns" ,
434
435
},
435
- Spec : operatorv2alpha1 .ControlPlaneSpec {
436
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
436
+ Spec : gwtypes .ControlPlaneSpec {
437
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
437
438
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
438
439
Type : operatorv2alpha1 .WatchNamespacesTypeList ,
439
440
List : []string {"ns1" , "ns2" },
@@ -452,8 +453,8 @@ func TestValidateWatchNamespaces(t *testing.T) {
452
453
Name : "test-cp" ,
453
454
Namespace : "cp-ns" ,
454
455
},
455
- Spec : operatorv2alpha1 .ControlPlaneSpec {
456
- ControlPlaneOptions : operatorv2alpha1 .ControlPlaneOptions {
456
+ Spec : gwtypes .ControlPlaneSpec {
457
+ ControlPlaneOptions : gwtypes .ControlPlaneOptions {
457
458
WatchNamespaces : & operatorv2alpha1.WatchNamespaces {
458
459
Type : operatorv2alpha1 .WatchNamespacesTypeList ,
459
460
List : []string {"forbidden-ns" },
0 commit comments