killSwitchRouter mounts the live API with the given fakes (no RoleGate — that gating is exercised separately in TestKillSwitchRequiresAdmin).
(live LiveInfo, fetcher PeerFetcher, users UserAdmin)
| 14 | // killSwitchRouter mounts the live API with the given fakes (no RoleGate — that |
| 15 | // gating is exercised separately in TestKillSwitchRequiresAdmin). |
| 16 | func 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 | |
| 23 | func doPost(t *testing.T, r *gin.Engine, path string) (int, map[string]any) { |
| 24 | t.Helper() |
no test coverage detected