test(19.7-05): framework unit tests for every validation row and the gate's admin stage

- pier: TestCatalog, TestDispatch, TestGuardRules, TestSessions (Redis
  across two instances and the memory store), TestFanOut; the store clock
  and stateless-server seams in export_test.go
- surf: TestStreamingRoute (throttle, CORS profile and access-log pattern on
  a stream route) and TestPierMount in both builds; the streaming smoke
  restores the mount hook it replaces
- wristband TestMCPScopes; cabana TestAccountContributions (Postgres part:
  transaction and unchanged My account payloads), TestRecordActionPrompt,
  TestScopeLimitForMethods; TestRecordActionPromptRun pins the empty Value
  of an action without a prompt
- vitest: 403 and failed-load cases for My account contributions, the
  cancelled prompt
- gate: every name required (tagged runs included), account.go unchanged
  since 51d088a, admin stage live
This commit is contained in:
Jakub Zych
2026-10-23 14:04:16 +02:00
parent 1111828e8a
commit f14eae96dd
18 changed files with 1696 additions and 10 deletions

View File

@@ -647,6 +647,18 @@ type routePlugin struct {
routes []testRoute
tools []pact.MCPTool
prompts []pact.MCPPrompt
// factory, when set, registers a pass-through middleware factory under
// that name (for <factory>:<param> requirement middleware).
factory string
}
func (p routePlugin) MiddlewareFactories() map[string]func(string) pact.Middleware {
if p.factory == "" {
return nil
}
return map[string]func(string) pact.Middleware{p.factory: func(string) pact.Middleware {
return func(next http.Handler) http.Handler { return next }
}}
}
func (p routePlugin) ID() string { return p.id }