test(cmd): require v1 cap and /api/healthz only

Update route assertions and regenerate swagger so the process no longer documents /api/cap or /api/health.
This commit is contained in:
ryan
2026-08-30 16:44:10 +08:00
parent 8931c3559c
commit 471d237af0
7 changed files with 700 additions and 591 deletions
+11 -2
View File
@@ -51,13 +51,22 @@ func TestNewOpenFlareAppRegistersServerAndWaveletUser(t *testing.T) {
got[rd.Method+" "+rd.Path] = true
}
for _, want := range []string{
"GET /api/health",
"GET /api/healthz",
"GET /api/v1/user/self",
"GET /api/v1/d/nodes",
"POST /api/cap/challenge",
"POST /api/v1/cap/challenge",
} {
if !got[want] {
t.Errorf("missing route %s", want)
}
}
for _, drop := range []string{
"GET /api/health",
"GET /healthz",
"POST /api/cap/challenge",
} {
if got[drop] {
t.Errorf("removed route still registered: %s", drop)
}
}
}