fix update existing test

This commit is contained in:
Tore S. Loenoey 2023-11-23 14:06:09 +01:00 committed by Tore Stendal Lønøy
parent a67865583f
commit 295cc1ae3e
No known key found for this signature in database

View file

@ -436,16 +436,17 @@ func TestBuildAuthLocation(t *testing.T) {
authURL string authURL string
globalAuthURL string globalAuthURL string
enableglobalExternalAuth bool enableglobalExternalAuth bool
globalAuthDefaultEnable bool
expected string expected string
}{ }{
{"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, externalAuthPath}, {"authURL, globalAuthURL and enabled", authURL, globalAuthURL, true, true, externalAuthPath},
{"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, externalAuthPath}, {"authURL, globalAuthURL and disabled", authURL, globalAuthURL, false, true, externalAuthPath},
{"authURL, empty globalAuthURL and enabled", authURL, "", true, externalAuthPath}, {"authURL, empty globalAuthURL and enabled", authURL, "", true, true, externalAuthPath},
{"authURL, empty globalAuthURL and disabled", authURL, "", false, externalAuthPath}, {"authURL, empty globalAuthURL and disabled", authURL, "", false, true, externalAuthPath},
{"globalAuthURL and enabled", "", globalAuthURL, true, externalAuthPath}, {"globalAuthURL and enabled", "", globalAuthURL, true, true, externalAuthPath},
{"globalAuthURL and disabled", "", globalAuthURL, false, ""}, {"globalAuthURL and disabled", "", globalAuthURL, false, true, ""},
{"all empty and enabled", "", "", true, ""}, {"all empty and enabled", "", "", true, true, ""},
{"all empty and disabled", "", "", false, ""}, {"all empty and disabled", "", "", false, true, ""},
} }
for _, testCase := range testCases { for _, testCase := range testCases {