Disable Cross-Namespace by default for IngressRoute provider
This commit is contained in:
parent
14499cd6e5
commit
3072354ca5
8 changed files with 23 additions and 30 deletions
|
@ -1153,8 +1153,7 @@ func TestLoadIngressRouteTCPs(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
p := Provider{IngressClass: test.ingressClass}
|
||||
p.SetDefaults()
|
||||
p := Provider{IngressClass: test.ingressClass, AllowCrossNamespace: true}
|
||||
|
||||
clientMock := newClientMock(test.paths...)
|
||||
conf := p.loadConfigurationFromCRD(context.Background(), clientMock)
|
||||
|
@ -3338,8 +3337,7 @@ func TestLoadIngressRoutes(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
p := Provider{IngressClass: test.ingressClass}
|
||||
p.SetDefaults()
|
||||
p := Provider{IngressClass: test.ingressClass, AllowCrossNamespace: true}
|
||||
|
||||
clientMock := newClientMock(test.paths...)
|
||||
conf := p.loadConfigurationFromCRD(context.Background(), clientMock)
|
||||
|
@ -3655,8 +3653,7 @@ func TestLoadIngressRouteUDPs(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
p := Provider{IngressClass: test.ingressClass}
|
||||
p.SetDefaults()
|
||||
p := Provider{IngressClass: test.ingressClass, AllowCrossNamespace: true}
|
||||
|
||||
clientMock := newClientMock(test.paths...)
|
||||
conf := p.loadConfigurationFromCRD(context.Background(), clientMock)
|
||||
|
@ -4439,9 +4436,8 @@ func TestCrossNamespace(t *testing.T) {
|
|||
}
|
||||
|
||||
p := Provider{}
|
||||
p.SetDefaults()
|
||||
|
||||
p.AllowCrossNamespace = func(b bool) *bool { return &b }(test.allowCrossNamespace)
|
||||
p.AllowCrossNamespace = test.allowCrossNamespace
|
||||
conf := p.loadConfigurationFromCRD(context.Background(), client)
|
||||
assert.Equal(t, test.expected, conf)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue