进一步精简配置保存流程
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-07 17:50:06 +08:00
1 parent 659d98b589
commit a7ad2bc32e
8 files changed
+26 -21

No files matched your search

+2 -1
View File
@@ -25,6 +25,7 @@ func TestReauthenticateCurrentUser(t *testing.T) {
oldSession := session.Instance
oldUserAttempts := reauthUserAttempts
oldIPAttempts := reauthIPAttempts
testRoot := t.TempDir()
t.Cleanup(func() {
if db.Instance != nil && db.Instance != oldDB {
_ = db.Instance.Close()
@@ -36,7 +37,7 @@ func TestReauthenticateCurrentUser(t *testing.T) {
reauthIPAttempts = oldIPAttempts
})
config.Instance = &config.Config{DbType: config.DBTypeSQLite, DbDSN: filepath.Join(t.TempDir(), "reauth.db")}
config.Instance = &config.Config{DbType: config.DBTypeSQLite, DbDSN: filepath.Join(testRoot, "reauth.db")}
if err := db.Init(""); err != nil {
t.Fatal(err)
}