mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-16 22:57:53 +08:00
- Preserve refresh failure stages and prevent immediate or later grant replay. - Coordinate durable claims and recovery receipts across file, PostgreSQL, Git, and S3 stores. - Add regression coverage for retries, concurrency, persistence, and recovery. Closes: #7289
20 lines
542 B
Go
20 lines
542 B
Go
package store
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/router-for-me/CLIProxyAPI/v8/internal/auth/codex"
|
|
)
|
|
|
|
func TestGitRefreshJournalCoordinatesRepositoryAliases(t *testing.T) {
|
|
root := t.TempDir()
|
|
setupGitRemoteRepository(t, root, "main", testBranchSpec{name: "main", contents: "initial\n"})
|
|
remote := filepath.Join(root, "seed")
|
|
journals := []codex.RefreshJournal{
|
|
NewGitTokenStore(remote, "", "", "main"),
|
|
NewGitTokenStore(filepath.Join(remote, ".git"), "", "", "main"),
|
|
}
|
|
exerciseSharedRefreshJournal(t, journals)
|
|
}
|