@@ -66,7 +66,7 @@ var _ = Describe("AuthPolicy controller", func() {
66
66
Name : testHTTPRouteName ,
67
67
Namespace : ptr .To (gatewayapiv1 .Namespace (testNamespace )),
68
68
},
69
- Defaults : & api.CommonSpec {
69
+ Defaults : & api.AuthPolicyCommonSpec {
70
70
AuthScheme : testBasicAuthScheme (),
71
71
},
72
72
},
@@ -1336,7 +1336,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1336
1336
1337
1337
It ("Valid when only explicit defaults are used" , func (ctx SpecContext ) {
1338
1338
policy := policyFactory (func (policy * api.AuthPolicy ) {
1339
- policy .Spec .Defaults = & api.CommonSpec {
1339
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {
1340
1340
AuthScheme : testBasicAuthScheme (),
1341
1341
}
1342
1342
})
@@ -1345,7 +1345,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1345
1345
1346
1346
It ("Invalid when both implicit and explicit defaults are used - authScheme" , func (ctx SpecContext ) {
1347
1347
policy := policyFactory (func (policy * api.AuthPolicy ) {
1348
- policy .Spec .Defaults = & api.CommonSpec {}
1348
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1349
1349
policy .Spec .AuthScheme = testBasicAuthScheme ()
1350
1350
})
1351
1351
err := k8sClient .Create (ctx , policy )
@@ -1355,7 +1355,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1355
1355
1356
1356
It ("Invalid when both implicit and explicit defaults are used - routeSelectors" , func (ctx SpecContext ) {
1357
1357
policy := policyFactory (func (policy * api.AuthPolicy ) {
1358
- policy .Spec .Defaults = & api.CommonSpec {}
1358
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1359
1359
policy .Spec .RouteSelectors = []api.RouteSelector {
1360
1360
{
1361
1361
Hostnames : []gatewayapiv1.Hostname {"*.foo.io" },
@@ -1376,7 +1376,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1376
1376
1377
1377
It ("Invalid when both implicit and explicit defaults are used - namedPatterns" , func (ctx SpecContext ) {
1378
1378
policy := policyFactory (func (policy * api.AuthPolicy ) {
1379
- policy .Spec .Defaults = & api.CommonSpec {}
1379
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1380
1380
policy .Spec .NamedPatterns = map [string ]authorinoapi.PatternExpressions {
1381
1381
"internal-source" : []authorinoapi.PatternExpression {
1382
1382
{
@@ -1394,7 +1394,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1394
1394
1395
1395
It ("Invalid when both implicit and explicit defaults are used - conditions" , func (ctx SpecContext ) {
1396
1396
policy := policyFactory (func (policy * api.AuthPolicy ) {
1397
- policy .Spec .Defaults = & api.CommonSpec {}
1397
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1398
1398
policy .Spec .Conditions = []authorinoapi.PatternExpressionOrRef {
1399
1399
{
1400
1400
PatternRef : authorinoapi.PatternRef {
@@ -1464,7 +1464,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1464
1464
1465
1465
It ("invalid usage of top-level route selectors with a gateway targetRef - defaults" , func () {
1466
1466
policy := policyFactory (func (policy * api.AuthPolicy ) {
1467
- policy .Spec .Defaults = & api.CommonSpec {}
1467
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1468
1468
policy .Spec .Defaults .RouteSelectors = routeSelectors
1469
1469
})
1470
1470
@@ -1496,7 +1496,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1496
1496
1497
1497
It ("invalid usage of config-level route selectors with a gateway targetRef - authentication - defaults" , func () {
1498
1498
policy := policyFactory (func (policy * api.AuthPolicy ) {
1499
- policy .Spec .Defaults = & api.CommonSpec {}
1499
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1500
1500
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1501
1501
Authentication : map [string ]api.AuthenticationSpec {
1502
1502
"my-rule" : {
@@ -1534,7 +1534,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1534
1534
1535
1535
It ("invalid usage of config-level route selectors with a gateway targetRef - metadata - defaults" , func () {
1536
1536
policy := policyFactory (func (policy * api.AuthPolicy ) {
1537
- policy .Spec .Defaults = & api.CommonSpec {}
1537
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1538
1538
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1539
1539
Metadata : map [string ]api.MetadataSpec {
1540
1540
"my-metadata" : {
@@ -1567,7 +1567,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1567
1567
1568
1568
It ("invalid usage of config-level route selectors with a gateway targetRef - authorization - defaults" , func () {
1569
1569
policy := policyFactory (func (policy * api.AuthPolicy ) {
1570
- policy .Spec .Defaults = & api.CommonSpec {}
1570
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1571
1571
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1572
1572
Authorization : map [string ]api.AuthorizationSpec {
1573
1573
"my-authZ" : {
@@ -1606,7 +1606,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1606
1606
1607
1607
It ("invalid usage of config-level route selectors with a gateway targetRef - response success headers - defaults" , func () {
1608
1608
policy := policyFactory (func (policy * api.AuthPolicy ) {
1609
- policy .Spec .Defaults = & api.CommonSpec {}
1609
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1610
1610
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1611
1611
Response : & api.ResponseSpec {
1612
1612
Success : api.WrappedSuccessResponseSpec {
@@ -1629,7 +1629,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1629
1629
1630
1630
It ("invalid usage of config-level route selectors with a gateway targetRef - response success dynamic metadata" , func () {
1631
1631
policy := policyFactory (func (policy * api.AuthPolicy ) {
1632
- policy .Spec .Defaults = & api.CommonSpec {}
1632
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1633
1633
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1634
1634
Response : & api.ResponseSpec {
1635
1635
Success : api.WrappedSuccessResponseSpec {
@@ -1650,7 +1650,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1650
1650
1651
1651
It ("invalid usage of config-level route selectors with a gateway targetRef - response success dynamic metadata - defaults" , func () {
1652
1652
policy := policyFactory (func (policy * api.AuthPolicy ) {
1653
- policy .Spec .Defaults = & api.CommonSpec {}
1653
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1654
1654
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1655
1655
Response : & api.ResponseSpec {
1656
1656
Success : api.WrappedSuccessResponseSpec {
@@ -1694,7 +1694,7 @@ var _ = Describe("AuthPolicy CEL Validations", func() {
1694
1694
1695
1695
It ("invalid usage of config-level route selectors with a gateway targetRef - callbacks - defaults" , func () {
1696
1696
policy := policyFactory (func (policy * api.AuthPolicy ) {
1697
- policy .Spec .Defaults = & api.CommonSpec {}
1697
+ policy .Spec .Defaults = & api.AuthPolicyCommonSpec {}
1698
1698
policy .Spec .Defaults .AuthScheme = & api.AuthSchemeSpec {
1699
1699
Callbacks : map [string ]api.CallbackSpec {
1700
1700
"callback" : {
0 commit comments