mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 16:04:01 +00:00
chore: drop _test.go files to keep the released tree test-free
The repository ships without test files; strips the tests that arrived with #160, #161 and #162 after their squash merges.
This commit is contained in:
1 parent
6bb3487f7f
commit
d8bcebd8ea
5 files changed
-264
No files matched your search
@@ -1,28 +0,0 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"opencode2api/internal/identity"
|
||||
)
|
||||
|
||||
// TestBenchSessionIsFresh pins the session the Playground bench sends upstream.
|
||||
// The bench replays one prompt per click, so a session derived from the prompt
|
||||
// would reuse a single bucket until it is charged and every later click would
|
||||
// answer 429 while live traffic succeeded.
|
||||
func TestBenchSessionIsFresh(t *testing.T) {
|
||||
first := benchSession()
|
||||
second := benchSession()
|
||||
|
||||
if first == "" {
|
||||
t.Fatal("empty session")
|
||||
}
|
||||
if first == second {
|
||||
t.Errorf("two bench requests reused session %q", first)
|
||||
}
|
||||
for _, session := range []string{first, second} {
|
||||
if reencoded := identity.CanonicalSessionID(session); reencoded != session {
|
||||
t.Errorf("bench session %q is not canonical (re-encoded to %q)", session, reencoded)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user