test(api): 处理器测试的每次请求在包结束后对照 openapi 校验状态码、响应与 2xx 请求体,SetupAllowed 纳入一致性比对,补齐漏记的状态码并修正空列表回 null

This commit is contained in:
Lemon-miaow committed 2026-09-25 18:24:47 +08:00
1 parent 1054e62fa9
commit e7326e6315
11 files changed
+937 -28

No files matched your search

+3
View File
@@ -43,6 +43,9 @@ func (a *API) handleListServers(w http.ResponseWriter, r *http.Request) {
writeError(w, r, err)
return
}
if servers == nil {
servers = []ServerInfo{} // an empty fleet is [], never null
}
writeJSON(w, http.StatusOK, map[string]any{"servers": servers})
}