Remove hard-coded names from e2e test and use local docker dependencies (#4502)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-09-01 14:16:52 -04:00 committed by GitHub
parent c7d2444cf4
commit c85450c1e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 894 additions and 293 deletions

View file

@ -38,11 +38,11 @@ var _ = framework.IngressNginxDescribe("Proxy host variable", func() {
})
It("should exist a proxy_host", func() {
upstreamName := fmt.Sprintf("%v-http-svc-80", f.Namespace)
upstreamName := fmt.Sprintf("%v-%v-80", f.Namespace, framework.EchoService)
annotations := map[string]string{
"nginx.ingress.kubernetes.io/configuration-snippet": `more_set_headers "Custom-Header: $proxy_host"`,
}
f.EnsureIngress(framework.NewSingleIngress(test, "/", test, f.Namespace, "http-svc", 80, &annotations))
f.EnsureIngress(framework.NewSingleIngress(test, "/", test, f.Namespace, framework.EchoService, 80, &annotations))
f.WaitForNginxConfiguration(
func(server string) bool {
@ -62,13 +62,13 @@ var _ = framework.IngressNginxDescribe("Proxy host variable", func() {
})
It("should exist a proxy_host using the upstream-vhost annotation value", func() {
upstreamName := fmt.Sprintf("%v-http-svc-80", f.Namespace)
upstreamName := fmt.Sprintf("%v-%v-80", f.Namespace, framework.EchoService)
upstreamVHost := "different.host"
annotations := map[string]string{
"nginx.ingress.kubernetes.io/upstream-vhost": upstreamVHost,
"nginx.ingress.kubernetes.io/configuration-snippet": `more_set_headers "Custom-Header: $proxy_host"`,
}
f.EnsureIngress(framework.NewSingleIngress(test, "/", test, f.Namespace, "http-svc", 80, &annotations))
f.EnsureIngress(framework.NewSingleIngress(test, "/", test, f.Namespace, framework.EchoService, 80, &annotations))
f.WaitForNginxConfiguration(
func(server string) bool {