Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Marchaud <[email protected]>
  • Loading branch information
Aluxima committed Jul 4, 2024
1 parent 29e22ea commit 52ab4f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/envoy/ingress_translator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func TestGeneratesForSingleIngress(t *testing.T) {
}

if c.Clusters[0].Hosts[0].Weight != 1 {
t.Errorf("expected cluster host's weight for 1, was %s", c.Clusters[0].Hosts[0].Weight)
t.Errorf("expected cluster host's weight for 1, was %d", c.Clusters[0].Hosts[0].Weight)
}

if c.VirtualHosts[0].UpstreamCluster != c.Clusters[0].Name {
Expand Down Expand Up @@ -309,10 +309,10 @@ func TestGeneratesForMultipleIngressSharingSpecHost(t *testing.T) {
t.Errorf("expected 2 host, was %d", len(c.Clusters[0].Hosts))
}
if c.Clusters[0].Hosts[0].Host != "foo.com" {
t.Errorf("expected cluster host for foo.com, was %s", c.Clusters[0].Hosts[0])
t.Errorf("expected cluster host for foo.com, was %s", c.Clusters[0].Hosts[0].Host)
}
if c.Clusters[0].Hosts[1].Host != "bar.com" {
t.Errorf("expected cluster host for bar.com, was %s", c.Clusters[0].Hosts[1])
t.Errorf("expected cluster host for bar.com, was %s", c.Clusters[0].Hosts[1].Host)
}

if c.VirtualHosts[0].UpstreamCluster != c.Clusters[0].Name {
Expand Down Expand Up @@ -345,7 +345,7 @@ func TestIngressWithIP(t *testing.T) {
ingress := newIngressIP("app.com", "127.0.0.1")
c := translateIngresses([]*k8s.Ingress{ingress}, false, []*v1.Secret{})
if c.Clusters[0].Hosts[0].Host != "127.0.0.1" {
t.Errorf("expected cluster host to be IP address, was %s", c.Clusters[0].Hosts[0])
t.Errorf("expected cluster host to be IP address, was %s", c.Clusters[0].Hosts[0].Host)
}
}

Expand Down

0 comments on commit 52ab4f4

Please sign in to comment.