From 295cc1ae3eb107ebc1474747197db08cd22ff887 Mon Sep 17 00:00:00 2001 From: "Tore S. Loenoey" Date: Thu, 23 Nov 2023 14:06:09 +0100 Subject: [PATCH] fix update existing test --- .../controller/template/template_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/ingress/controller/template/template_test.go b/internal/ingress/controller/template/template_test.go index d8d01cfde..c64fb1bb8 100644 --- a/internal/ingress/controller/template/template_test.go +++ b/internal/ingress/controller/template/template_test.go @@ -436,16 +436,17 @@ func TestBuildAuthLocation(t *testing.T) { authURL string globalAuthURL string enableglobalExternalAuth bool + globalAuthDefaultEnable bool expected string }{ - {"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, externalAuthPath}, - {"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, externalAuthPath}, - {"authURL, empty globalAuthURL and enabled", authURL, "", true, externalAuthPath}, - {"authURL, empty globalAuthURL and disabled", authURL, "", false, externalAuthPath}, - {"globalAuthURL and enabled", "", globalAuthURL, true, externalAuthPath}, - {"globalAuthURL and disabled", "", globalAuthURL, false, ""}, - {"all empty and enabled", "", "", true, ""}, - {"all empty and disabled", "", "", false, ""}, + {"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, true, externalAuthPath}, + {"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, true, externalAuthPath}, + {"authURL, empty globalAuthURL and enabled", authURL, "", true, true, externalAuthPath}, + {"authURL, empty globalAuthURL and disabled", authURL, "", false, true, externalAuthPath}, + {"globalAuthURL and enabled", "", globalAuthURL, true, true, externalAuthPath}, + {"globalAuthURL and disabled", "", globalAuthURL, false, true, ""}, + {"all empty and enabled", "", "", true, true, ""}, + {"all empty and disabled", "", "", false, true, ""}, } for _, testCase := range testCases {