Skip to content

Commit bf4a60b

Browse files
test(deploy): map POST /deploy/:id/wake in DoneBar route-coverage guard
The scale-to-zero wake route is live in the router but had no routeTestMap row, so TestDoneBar_EveryRouteCovered failed ("route POST /deploy/:id/wake has no mapped test and no exemption"). Map it to TestWake_HappyPath — the flag-ON handler suite (deploy_wake_mock_test.go) drives the route through requireTeam + the scale + DB-flip + re-read contract, which the guard's ../handlers AST scan recognises as a covering integration test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 997311e commit bf4a60b

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

internal/router/route_donebar_guard_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,14 @@ var routeTestMap = map[string]string{
304304
// 402 + redeploy CAS guard. Heavy Kaniko-build legs assert the
305305
// accepted/contract surface (noop compute), not a live build — deferred to
306306
// the W4 e2e specs. Moved here from routeCoverageExemptions.
307-
"PATCH /deploy/:id/env": "TestDeployLifecycle_UpdateEnv_MergesAndRedacts",
308-
"POST /deploy/:id/redeploy": "TestDeployLifecycle_Redeploy_HealthyRow_Accepts202",
307+
"PATCH /deploy/:id/env": "TestDeployLifecycle_UpdateEnv_MergesAndRedacts",
308+
"POST /deploy/:id/redeploy": "TestDeployLifecycle_Redeploy_HealthyRow_Accepts202",
309+
// Scale-to-zero explicit wake (mig 068, Task #54). Covered by the flag-ON
310+
// sqlmock handler suite (deploy_wake_mock_test.go): happy-path scale+DB
311+
// flip+re-read, not-found, cross-team 404, scale-failure 503, DB-error 503,
312+
// requireTeam 401, fetch driver-error 503, re-read fallback. Flag-OFF 501 is
313+
// in deploy_wake_test.go.
314+
"POST /deploy/:id/wake": "TestWake_HappyPath",
309315
"PATCH /api/v1/deployments/:id": "TestDeployLifecycle_Patch_Pro_SetsPrivate",
310316
"POST /api/v1/deployments/:id/make-permanent": "TestDeployLifecycle_MakePermanent_HappyPath",
311317
"POST /api/v1/deployments/:id/ttl": "TestDeployLifecycle_SetTTL_HappyPath",

0 commit comments

Comments
 (0)