From c554e9731c0be49317cb4bdf9a3b41847562cb96 Mon Sep 17 00:00:00 2001 From: "Tore S. Loenoey" Date: Thu, 23 Nov 2023 11:54:51 +0100 Subject: [PATCH] test: 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 7a306d306..ffe2ae234 100644 --- a/internal/ingress/controller/template/template_test.go +++ b/internal/ingress/controller/template/template_test.go @@ -477,16 +477,17 @@ func TestShouldApplyGlobalAuth(t *testing.T) { authURL string globalAuthURL string enableglobalExternalAuth bool + globalAuthDefaultEnable bool expected bool }{ - {"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, false}, - {"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, false}, - {"authURL, empty globalAuthURL and enabled", authURL, "", true, false}, - {"authURL, empty globalAuthURL and disabled", authURL, "", false, false}, - {"globalAuthURL and enabled", "", globalAuthURL, true, true}, - {"globalAuthURL and disabled", "", globalAuthURL, false, false}, - {"all empty and enabled", "", "", true, false}, - {"all empty and disabled", "", "", false, false}, + {"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, true, false}, + {"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, true, false}, + {"authURL, empty globalAuthURL and enabled", authURL, "", true, true, false}, + {"authURL, empty globalAuthURL and disabled", authURL, "", false, true, false}, + {"globalAuthURL and enabled", "", globalAuthURL, true, true, true}, + {"globalAuthURL and disabled", "", globalAuthURL, false, true, false}, + {"all empty and enabled", "", "", true, true, false}, + {"all empty and disabled", "", "", false, true, false}, } for _, testCase := range testCases {