Skip to content

Commit

Permalink
Ambassador Host go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMartin901 committed Jun 7, 2022
1 parent 1629661 commit f702e14
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions source/ambassador_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
ambassadorHostItems []fakeAmbassadorHost
expected []*endpoint.Endpoint
expectError bool
labelSelector labels.Selector
labelSelector labels.Selector
}{
{
title: "no host",
targetNamespace: "",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
},
{
title: "two simple hosts",
targetNamespace: "",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -119,7 +119,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
{
title: "two simple hosts on different namespaces",
targetNamespace: "",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -166,7 +166,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
{
title: "two simple hosts on different namespaces and a target namespace",
targetNamespace: "testing1",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -205,7 +205,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
{
title: "invalid non matching host ambassador service annotation",
targetNamespace: "",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand All @@ -229,7 +229,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid matching annotation filter expression",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -262,7 +262,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid non-matching annotation filter expression",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand All @@ -286,7 +286,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "invalid annotation filter expression",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external ingress)",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand All @@ -311,7 +311,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid matching annotation filter label",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class=external-ingress",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -344,7 +344,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid non-matching annotation filter label",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class=external-ingress",
labelSelector: labels.Everything(),
labelSelector: labels.Everything(),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand All @@ -365,9 +365,9 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
expected: []*endpoint.Endpoint{},
},
{
title: "valid non-matching label filter expression",
targetNamespace: "",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "external-ingress"}),
title: "valid non-matching label filter expression",
targetNamespace: "",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "external-ingress"}),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand All @@ -390,9 +390,9 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
expected: []*endpoint.Endpoint{},
},
{
title: "valid matching label filter expression for single host",
targetNamespace: "",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "external-ingress"}),
title: "valid matching label filter expression for single host",
targetNamespace: "",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "external-ingress"}),
loadBalancer: fakeAmbassadorLoadBalancerService{
ips: []string{"8.8.8.8"},
hostnames: []string{"lb.com"},
Expand Down Expand Up @@ -439,7 +439,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid matching label filter expression and matching annotation filter",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "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"},
Expand Down Expand Up @@ -475,7 +475,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid non matching label filter expression and valid matching annotation filter",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "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"},
Expand All @@ -502,7 +502,7 @@ func testAmbassadorSourceEndpoints(t *testing.T) {
title: "valid matching label filter expression and non matching annotation filter",
targetNamespace: "",
annotationFilter: "kubernetes.io/ingress.class in (external-ingress)",
labelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/ingress.class": "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"},
Expand Down

0 comments on commit f702e14

Please sign in to comment.