fix: resolve 3 test package failures for Windows compatibility
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

- config: add optional configPaths parameter to load() for test isolation
  (tests now use t.TempDir() to avoid interference from D:\app\data)
- handler: fix stubAccountRepoForHandler.ListByPlatform to return accounts
  (was returning nil, nil causing "no available accounts" errors)
- logger: fix Sync() blocking on Windows pipes by closing write end first
  (also add Reset() function to close lumberjack file handles for cleanup)
This commit is contained in:
User
2026-04-13 01:09:46 +08:00
parent 5ca850700b
commit 146a306343
6 changed files with 53 additions and 22 deletions

View File

@@ -2082,7 +2082,7 @@ func (r *stubAccountRepoForHandler) ListActive(context.Context) ([]service.Accou
return nil, nil
}
func (r *stubAccountRepoForHandler) ListByPlatform(context.Context, string) ([]service.Account, error) {
return nil, nil
return r.accounts, nil
}
func (r *stubAccountRepoForHandler) UpdateLastUsed(context.Context, int64) error { return nil }
func (r *stubAccountRepoForHandler) BatchUpdateLastUsed(context.Context, map[int64]time.Time) error {