From df3f5aa6ce8ad58fb5f18a86bc9ab62f10a51f4e Mon Sep 17 00:00:00 2001 From: Marco Ebert Date: Mon, 26 Aug 2024 17:51:33 +0200 Subject: [PATCH] Tests: Use `framework.AllowSnippetConfiguration`. --- test/e2e/settings/proxy_host.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/e2e/settings/proxy_host.go b/test/e2e/settings/proxy_host.go index 3ce86127e..bb5dc9c01 100644 --- a/test/e2e/settings/proxy_host.go +++ b/test/e2e/settings/proxy_host.go @@ -58,16 +58,8 @@ var _ = framework.IngressNginxDescribe("Dynamic $proxy_host", func() { }) ginkgo.It("should exist a proxy_host using the upstream-vhost annotation value", func() { - f.SetNginxConfigMapData(map[string]string{ - "allow-snippet-annotations": "true", - "annotations-risk-level": "Critical", // To allow Configuration Snippet - }) - defer func() { - f.SetNginxConfigMapData(map[string]string{ - "allow-snippet-annotations": "false", - "annotations-risk-level": "High", - }) - }() + disableSnippet := f.AllowSnippetConfiguration() + defer disableSnippet() upstreamName := fmt.Sprintf("%v-%v-80", f.Namespace, framework.EchoService) upstreamVHost := "different.host"