Fix incorrect setting loading order (#36735)

This commit is contained in:
wxiaoguang
2026-02-24 23:46:08 +08:00
committed by GitHub
parent 429ba9c010
commit 75efc51e98
3 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -29,8 +29,10 @@ func TestShortSha(t *testing.T) {
func TestVerifyTimeLimitCode(t *testing.T) {
defer test.MockVariableValue(&setting.InstallLock, true)()
initGeneralSecret := func(secret string) {
setting.InstallLock = true
setting.CfgProvider, _ = setting.NewConfigProviderFromData(fmt.Sprintf(`
[security]
INTERNAL_TOKEN = dummy
INSTALL_LOCK = true
[oauth2]
JWT_SECRET = %s
`, secret))