From c0035d29c3b5ca36d538e7f2848f6a03e298a2c3 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 16 Jun 2020 10:37:57 -0400 Subject: [PATCH] Fix e2e externalName test --- .../servicebackend/service_externalname.go | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/e2e/servicebackend/service_externalname.go b/test/e2e/servicebackend/service_externalname.go index bef790c156..d14c11dfc2 100644 --- a/test/e2e/servicebackend/service_externalname.go +++ b/test/e2e/servicebackend/service_externalname.go @@ -86,7 +86,10 @@ var _ = framework.IngressNginxDescribe("[Service] Type ExternalName", func() { f.EnsureService(svc) - ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, nil) + annotations := map[string]string{ + "nginx.ingress.kubernetes.io/upstream-vhost": "httpbin.org", + } + ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, annotations) f.EnsureIngress(ing) f.WaitForNginxServer(host, @@ -124,7 +127,10 @@ var _ = framework.IngressNginxDescribe("[Service] Type ExternalName", func() { } f.EnsureService(svc) - ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, nil) + annotations := map[string]string{ + "nginx.ingress.kubernetes.io/upstream-vhost": "httpbin.org", + } + ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, annotations) f.EnsureIngress(ing) f.WaitForNginxServer(host, @@ -193,7 +199,10 @@ var _ = framework.IngressNginxDescribe("[Service] Type ExternalName", func() { } f.EnsureService(svc) - ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, nil) + annotations := map[string]string{ + "nginx.ingress.kubernetes.io/upstream-vhost": "httpbin.org", + } + ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, annotations) ing.Spec.Rules[0].HTTP.Paths[0].Backend.ServicePort = intstr.FromString(host) f.EnsureIngress(ing) @@ -232,7 +241,10 @@ var _ = framework.IngressNginxDescribe("[Service] Type ExternalName", func() { } f.EnsureService(svc) - ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, nil) + annotations := map[string]string{ + "nginx.ingress.kubernetes.io/upstream-vhost": "httpbin.org", + } + ing := framework.NewSingleIngress(host, "/", host, f.Namespace, framework.HTTPBinService, 80, annotations) ing.Spec.Rules[0].HTTP.Paths[0].Backend.ServicePort = intstr.FromString(host) f.EnsureIngress(ing)