From 743c45b04da729472d3f7f2977548d9fdfd73dd4 Mon Sep 17 00:00:00 2001 From: Revolution1 Date: Sat, 7 Sep 2024 11:41:36 +0800 Subject: [PATCH] fix e2e --- test/e2e/annotations/canary.go | 4 ++-- test/e2e/settings/proxy_host.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/annotations/canary.go b/test/e2e/annotations/canary.go index ea733dbf4..633c22135 100644 --- a/test/e2e/annotations/canary.go +++ b/test/e2e/annotations/canary.go @@ -1091,8 +1091,8 @@ var _ = framework.DescribeAnnotation("canary-*", func() { f.WaitForNginxServer("_", func(server string) bool { - upstreamName := fmt.Sprintf(`set $proxy_upstream_name "%s-%s-%s";`, f.Namespace, framework.HTTPBunService, "80") - canaryUpstreamName := fmt.Sprintf(`set $proxy_upstream_name "%s-%s-%s";`, f.Namespace, canaryService, "80") + upstreamName := fmt.Sprintf(`set $proxy_upstream_name "%s_%s_%s";`, f.Namespace, framework.HTTPBunService, "80") + canaryUpstreamName := fmt.Sprintf(`set $proxy_upstream_name "%s_%s_%s";`, f.Namespace, canaryService, "80") return strings.Contains(server, fmt.Sprintf(`set $ingress_name "%v";`, host)) && !strings.Contains(server, `set $proxy_upstream_name "upstream-default-backend";`) && diff --git a/test/e2e/settings/proxy_host.go b/test/e2e/settings/proxy_host.go index bb5dc9c01..9c990c9ee 100644 --- a/test/e2e/settings/proxy_host.go +++ b/test/e2e/settings/proxy_host.go @@ -37,7 +37,7 @@ var _ = framework.IngressNginxDescribe("Dynamic $proxy_host", func() { disableSnippet := f.AllowSnippetConfiguration() defer disableSnippet() - upstreamName := fmt.Sprintf("%v-%v-80", f.Namespace, framework.EchoService) + 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"`, } @@ -61,7 +61,7 @@ var _ = framework.IngressNginxDescribe("Dynamic $proxy_host", func() { disableSnippet := f.AllowSnippetConfiguration() defer disableSnippet() - upstreamName := fmt.Sprintf("%v-%v-80", f.Namespace, framework.EchoService) + upstreamName := fmt.Sprintf("%v_%v_80", f.Namespace, framework.EchoService) upstreamVHost := "different.host" annotations := map[string]string{ "nginx.ingress.kubernetes.io/upstream-vhost": upstreamVHost,