Files
magpie/internal
yetone e5994a0159 gateway tests: a fake upstream judges only what the gateway sent it (#6535)
TestTencentTokenHubRoutes went red once in a full internal/gateway run
on the Linux box: "asked at /ws/herdr". Another program on the machine,
a herdr client, reached the fake upstream's loopback port, and the test
fails on any path its fake was asked at. TestQianfan's and Bedrock's
"asked at" loops do the same.

All three now judge only requests that carry the test's key
(sentByTest). The gateway sends that key on every call, so a wrong path
it asks at still fails.

Run:
- wsl-run go test ./internal/gateway -count=3 -run
  'TestTencentTokenHubRoutes|Qianfan|Bedrock': ok.
- GOOS=windows go vet ./internal/gateway: ok. gofmt -l: clean.
- Broken by hand: a GET of srv.URL+"/ws/herdr" added before
  TokenHub's check is green with the filter, and red
  ("tokenhub_test.go:155: asked at /ws/herdr") with it taken out.

Not changed: the shared fake that native_compaction_test.go's "asked at"
reads keeps only the last request's path, so a stray request can still
overwrite it. Noted on #6535.
2026-11-13 19:36:33 +08:00
..
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…