Skip to content

Commit

Permalink
Remove Ambassador Host reduntant label filter test
Browse files Browse the repository at this point in the history
Removing the `valid matching label filter expression` test in favour of just using `valid matching label filter expression for single host` as it is testing the same thing that a Ambassador Host with a valid label is matched.

Disscussed with alebedev87 in kubernetes-sigs#2633 (comment)
  • Loading branch information
KyleMartin901 committed Jun 7, 2022
1 parent 2482ef5 commit 23d3128
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions source/ambassador_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,42 +364,6 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
},
expected: []*endpoint.Endpoint{},
},
{
title: "valid matching label filter expression",
targetNamespace: "",
// annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "external-ingress"}),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
name: "emissary",
namespace: "emissary-ingress",
},
ambassadorHostItems: []fakeAmbassadorHost{
{
name: "fake1",
namespace: "testing1",
hostname: "fake1.org",
annotations: map[string]string{
"external-dns.ambassador-service": "emissary-ingress/emissary",
"kubernetes.io/ingress.class": "external-ingress",
},
labels: map[string]string{
"kubernetes.io/ingress.class": "external-ingress",
},
},
},
expected: []*endpoint.Endpoint{
{
DNSName: "fake1.org",
Targets: endpoint.Targets{"8.8.8.8"},
},
{
DNSName: "fake1.org",
Targets: endpoint.Targets{"lb.com"},
},
},
},
{
title: "valid non-matching label filter expression",
targetNamespace: "",
Expand Down

0 comments on commit 23d3128

Please sign in to comment.