Skip to content

Commit

Permalink
tests: fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodman10 committed Aug 14, 2023
1 parent 8d15c3f commit db83b8e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions internal/dataplane/parser/translate_kong_l4_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ func TestFromTCPIngressV1beta1(t *testing.T) {
func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
testCases := []struct {
name string
tcpIngresses []*configurationv1beta1.TCPIngress
tcpIngresses []*kongv1beta1.TCPIngress
expectedKongServices []kongstate.Service
expectedKongRoutes map[string][]kongstate.Route
expectedFailures []failures.ResourceFailure
}{
{
name: "tcpingress with single rule",
tcpIngresses: []*configurationv1beta1.TCPIngress{
tcpIngresses: []*kongv1beta1.TCPIngress{
{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Expand All @@ -233,11 +233,11 @@ func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
annotations.IngressClassKey: annotations.DefaultIngressClass,
},
},
Spec: configurationv1beta1.TCPIngressSpec{
Rules: []configurationv1beta1.IngressRule{
Spec: kongv1beta1.TCPIngressSpec{
Rules: []kongv1beta1.IngressRule{
{
Port: 9000,
Backend: configurationv1beta1.IngressBackend{
Backend: kongv1beta1.IngressBackend{
ServiceName: "foo-svc",
ServicePort: 80,
},
Expand Down Expand Up @@ -274,7 +274,7 @@ func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
},
{
name: "tcpingress with multiple rules",
tcpIngresses: []*configurationv1beta1.TCPIngress{
tcpIngresses: []*kongv1beta1.TCPIngress{
{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Expand All @@ -283,18 +283,18 @@ func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
annotations.IngressClassKey: annotations.DefaultIngressClass,
},
},
Spec: configurationv1beta1.TCPIngressSpec{
Rules: []configurationv1beta1.IngressRule{
Spec: kongv1beta1.TCPIngressSpec{
Rules: []kongv1beta1.IngressRule{
{
Port: 9000,
Backend: configurationv1beta1.IngressBackend{
Backend: kongv1beta1.IngressBackend{
ServiceName: "foo-svc1",
ServicePort: 80,
},
},
{
Port: 9090,
Backend: configurationv1beta1.IngressBackend{
Backend: kongv1beta1.IngressBackend{
ServiceName: "foo-svc2",
ServicePort: 8080,
},
Expand Down Expand Up @@ -352,7 +352,7 @@ func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
},
{
name: "tcpingress with sni",
tcpIngresses: []*configurationv1beta1.TCPIngress{
tcpIngresses: []*kongv1beta1.TCPIngress{
{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
Expand All @@ -361,12 +361,12 @@ func TestIngressRulesFromTCPIngressV1beta1UsingExpressionRoutes(t *testing.T) {
annotations.IngressClassKey: annotations.DefaultIngressClass,
},
},
Spec: configurationv1beta1.TCPIngressSpec{
Rules: []configurationv1beta1.IngressRule{
Spec: kongv1beta1.TCPIngressSpec{
Rules: []kongv1beta1.IngressRule{
{
Host: "www.foo-bar.com",
Port: 9000,
Backend: configurationv1beta1.IngressBackend{
Backend: kongv1beta1.IngressBackend{
ServiceName: "foo-svc",
ServicePort: 80,
},
Expand Down

0 comments on commit db83b8e

Please sign in to comment.