mirror of
https://github.com/alibaba/higress.git
synced 2026-06-10 05:07:30 +08:00
fix gateway name (#672)
This commit is contained in:
@@ -257,7 +257,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"foo.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-foo-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("foo.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1beta1",
|
||||
@@ -270,7 +270,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1beta1-wakanda-test-1-foo-com",
|
||||
Name: "http-80-ingress-ingress-v1beta1",
|
||||
},
|
||||
Hosts: []string{"foo.com"},
|
||||
},
|
||||
@@ -278,7 +278,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 443,
|
||||
Protocol: "HTTPS",
|
||||
Name: "https-443-ingress-ingress-v1beta1-wakanda-test-2-foo-com",
|
||||
Name: "https-443-ingress-ingress-v1beta1",
|
||||
},
|
||||
Hosts: []string{"foo.com"},
|
||||
Tls: &networking.ServerTLSSettings{
|
||||
@@ -293,7 +293,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"test.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-test-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("test.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1beta1",
|
||||
@@ -306,7 +306,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1beta1-wakanda-test-1-test-com",
|
||||
Name: "http-80-ingress-ingress-v1beta1",
|
||||
},
|
||||
Hosts: []string{"test.com"},
|
||||
},
|
||||
@@ -314,7 +314,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 443,
|
||||
Protocol: "HTTPS",
|
||||
Name: "https-443-ingress-ingress-v1beta1-wakanda-test-1-test-com",
|
||||
Name: "https-443-ingress-ingress-v1beta1",
|
||||
},
|
||||
Hosts: []string{"test.com"},
|
||||
Tls: &networking.ServerTLSSettings{
|
||||
@@ -329,7 +329,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"bar.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-bar-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("bar.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1beta1",
|
||||
@@ -342,7 +342,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1beta1-wakanda-test-2-bar-com",
|
||||
Name: "http-80-ingress-ingress-v1beta1",
|
||||
},
|
||||
Hosts: []string{"bar.com"},
|
||||
},
|
||||
@@ -471,7 +471,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"foo.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-foo-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("foo.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1",
|
||||
@@ -484,7 +484,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1-wakanda-test-1-foo-com",
|
||||
Name: "http-80-ingress-ingress-v1",
|
||||
},
|
||||
Hosts: []string{"foo.com"},
|
||||
},
|
||||
@@ -492,7 +492,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 443,
|
||||
Protocol: "HTTPS",
|
||||
Name: "https-443-ingress-ingress-v1-wakanda-test-2-foo-com",
|
||||
Name: "https-443-ingress-ingress-v1",
|
||||
},
|
||||
Hosts: []string{"foo.com"},
|
||||
Tls: &networking.ServerTLSSettings{
|
||||
@@ -507,7 +507,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"test.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-test-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("test.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1",
|
||||
@@ -520,7 +520,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1-wakanda-test-1-test-com",
|
||||
Name: "http-80-ingress-ingress-v1",
|
||||
},
|
||||
Hosts: []string{"test.com"},
|
||||
},
|
||||
@@ -528,7 +528,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 443,
|
||||
Protocol: "HTTPS",
|
||||
Name: "https-443-ingress-ingress-v1-wakanda-test-1-test-com",
|
||||
Name: "https-443-ingress-ingress-v1",
|
||||
},
|
||||
Hosts: []string{"test.com"},
|
||||
Tls: &networking.ServerTLSSettings{
|
||||
@@ -543,7 +543,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
"bar.com": {
|
||||
Meta: config.Meta{
|
||||
GroupVersionKind: gvk.Gateway,
|
||||
Name: "istio-autogenerated-k8s-ingress-bar-com",
|
||||
Name: "istio-autogenerated-k8s-ingress-" + common.CleanHost("bar.com"),
|
||||
Namespace: "wakanda",
|
||||
Annotations: map[string]string{
|
||||
common.ClusterIdAnnotation: "ingress-v1",
|
||||
@@ -556,7 +556,7 @@ func TestConvertGatewaysForIngress(t *testing.T) {
|
||||
Port: &networking.Port{
|
||||
Number: 80,
|
||||
Protocol: "HTTP",
|
||||
Name: "http-80-ingress-ingress-v1-wakanda-test-2-bar-com",
|
||||
Name: "http-80-ingress-ingress-v1",
|
||||
},
|
||||
Hosts: []string{"bar.com"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user