MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestBuildAPIKeyClientsCounts

Function TestBuildAPIKeyClientsCounts

internal/watcher/watcher_test.go:64–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestBuildAPIKeyClientsCounts(t *testing.T) {
65 cfg := &config.Config{
66 GeminiKey: []config.GeminiKey{{APIKey: "g1"}, {APIKey: "g2"}},
67 VertexCompatAPIKey: []config.VertexCompatKey{
68 {APIKey: "v1"},
69 },
70 ClaudeKey: []config.ClaudeKey{{APIKey: "c1"}},
71 CodexKey: []config.CodexKey{{APIKey: "x1"}, {APIKey: "x2"}},
72 OpenAICompatibility: []config.OpenAICompatibility{
73 {APIKeyEntries: []config.OpenAICompatibilityAPIKey{{APIKey: "o1"}, {APIKey: "o2"}}},
74 },
75 }
76
77 gemini, vertex, claude, codex, compat := BuildAPIKeyClients(cfg)
78 if gemini != 2 || vertex != 1 || claude != 1 || codex != 2 || compat != 2 {
79 t.Fatalf("unexpected counts: %d %d %d %d %d", gemini, vertex, claude, codex, compat)
80 }
81}
82
83func TestNormalizeAuthStripsTemporalFields(t *testing.T) {
84 now := time.Now()

Callers

nothing calls this directly

Calls 1

BuildAPIKeyClientsFunction · 0.85

Tested by

no test coverage detected