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

@ -62,7 +62,7 @@ var _ = framework.IngressNginxDescribe("TCP Feature", func() {
config.Data = map[string]string{}
}
config.Data["8080"] = fmt.Sprintf("%v/http-svc:80", f.Namespace)
config.Data["8080"] = fmt.Sprintf("%v/%v:80", f.Namespace, framework.EchoService)
_, err = f.KubeClientSet.
CoreV1().
@ -78,7 +78,7 @@ var _ = framework.IngressNginxDescribe("TCP Feature", func() {
Expect(svc).NotTo(BeNil(), "expected a service but none returned")
svc.Spec.Ports = append(svc.Spec.Ports, corev1.ServicePort{
Name: "http-svc",
Name: framework.EchoService,
Port: 8080,
TargetPort: intstr.FromInt(8080),
})
@ -90,7 +90,7 @@ var _ = framework.IngressNginxDescribe("TCP Feature", func() {
f.WaitForNginxConfiguration(
func(cfg string) bool {
return strings.Contains(cfg, fmt.Sprintf(`ngx.var.proxy_upstream_name="tcp-%v-http-svc-80"`, f.Namespace))
return strings.Contains(cfg, fmt.Sprintf(`ngx.var.proxy_upstream_name="tcp-%v-%v-80"`, f.Namespace, framework.EchoService))
})
ip := f.GetNginxIP()