v1 plan: helpers_test.go as a given file, fake upstream records /v1/models, no /tmp rule; note task 05 findings

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 04:56:22 -07:00
co-authored by Claude Fable 5.1
parent 1cc645a85b
commit 7bc6761120
4 changed files with 55 additions and 1 deletions
@@ -43,6 +43,9 @@ func newUpstream(t *testing.T, name string) *upstream {
mux := http.NewServeMux()
mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, `{"status":"ok"}`) })
mux.HandleFunc("/v1/models", func(w http.ResponseWriter, r *http.Request) {
u.mu.Lock()
u.last = recorded{r.Method, r.URL.RequestURI(), r.Host, r.Header.Get("X-Forwarded-For"), ""}
u.mu.Unlock()
fmt.Fprint(w, `{"object":"list","data":[{"id":"shared"},{"id":"`+name+`-only"}]}`)
})
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {