mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 09:36:58 +02:00
Update tests for ingress class filtering
This commit is contained in:
parent
8da6f99857
commit
ac0c4be36a
@ -1175,7 +1175,7 @@ func testIngressEndpoints(t *testing.T) {
|
||||
{
|
||||
title: "ingressClassName filtering",
|
||||
targetNamespace: "",
|
||||
ingressClassNameFilter: []string{"public"},
|
||||
ingressClassNames: []string{"public", "dmz"},
|
||||
ingressItems: []fakeIngress{
|
||||
{
|
||||
name: "fake-public",
|
||||
@ -1191,12 +1191,23 @@ func testIngressEndpoints(t *testing.T) {
|
||||
ips: []string{"2.3.4.5"},
|
||||
ingressClassName: "internal",
|
||||
},
|
||||
{
|
||||
name: "fake-dmz",
|
||||
namespace: namespace,
|
||||
tlsdnsnames: [][]string{{"dmz.example.org"}},
|
||||
ips: []string{"3.4.5.6"},
|
||||
ingressClassName: "dmz",
|
||||
},
|
||||
},
|
||||
expected: []*endpoint.Endpoint{
|
||||
{
|
||||
DNSName: "example.org",
|
||||
Targets: endpoint.Targets{"1.2.3.4"},
|
||||
},
|
||||
{
|
||||
DNSName: "dmz.example.org",
|
||||
Targets: endpoint.Targets{"3.4.5.6"},
|
||||
},
|
||||
},
|
||||
},
|
||||
} {
|
||||
@ -1219,7 +1230,7 @@ func testIngressEndpoints(t *testing.T) {
|
||||
ti.ignoreHostnameAnnotation,
|
||||
ti.ignoreIngressTLSSpec,
|
||||
ti.ignoreIngressRulesSpec,
|
||||
ti.ingressClassNameFilter,
|
||||
ti.ingressClassNames,
|
||||
)
|
||||
// Informer cache has all of the ingresses. Retrieve and validate their endpoints.
|
||||
res, err := source.Endpoints(context.Background())
|
||||
|
Loading…
Reference in New Issue
Block a user