Skip to content

Commit

Permalink
Fix e2e externalName test
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf committed Jun 16, 2020
1 parent c5d7e2a commit c0035d2
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions test/e2e/servicebackend/service_externalname.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit c0035d2

Please sign in to comment.