MCPcopy Create free account
hub / github.com/PostHog/duckgres / killSwitchRouter

Function killSwitchRouter

controlplane/admin/kill_switch_test.go:16–21  ·  view source on GitHub ↗

killSwitchRouter mounts the live API with the given fakes (no RoleGate — that gating is exercised separately in TestKillSwitchRequiresAdmin).

(live LiveInfo, fetcher PeerFetcher, users UserAdmin)

Source from the content-addressed store, hash-verified

14// killSwitchRouter mounts the live API with the given fakes (no RoleGate — that
15// gating is exercised separately in TestKillSwitchRequiresAdmin).
16func killSwitchRouter(live LiveInfo, fetcher PeerFetcher, users UserAdmin) *gin.Engine {
17 gin.SetMode(gin.TestMode)
18 e := gin.New()
19 registerLiveAPI(e.Group("/api/v1"), live, fetcher, users)
20 return e
21}
22
23func doPost(t *testing.T, r *gin.Engine, path string) (int, map[string]any) {
24 t.Helper()

Calls 1

registerLiveAPIFunction · 0.85

Tested by

no test coverage detected