test(routers): 断言跟上上游重构——/ai/analyze 改为 /ai/chat,补 license 路由
CI / Backend (go vet + test) (push) Waiting to run
CI / Frontend (lint + build + test) (push) Waiting to run

上游 fbbd3a3/6923a12 把整页 AIOps 改成浮窗助手:
  - 删除 POST /ai/analyze(整页结构化分析)
  - 新增 POST /ai/chat(助手对话,AdminAuth + RequirePro)
  - 新增 GET /system/license、POST /system/license/activate
路由回归测试仍在断言已删除的 /ai/analyze,导致 TestCriticalRoutes 失败。
本次按实际路由更新断言(这正是这个测试的价值:路由被删/改名时立刻暴露)。

注:services.RunAIAnalysis / CollectAISignals 现在没有任何调用方(死代码),
是否保留待确认——见 PR 讨论。
This commit is contained in:
opsx committed 2026-10-31 18:08:59 +00:00
1 parent 02c1ee8aa8
commit 0644dccf2a
1 file changed
+4 -1
+4 -1
View File
@@ -55,7 +55,10 @@ func TestCriticalRoutes(t *testing.T) {
{"GET", "/api/v1/ai/config"}, {"GET", "/api/v1/ai/config"},
{"PUT", "/api/v1/ai/config"}, {"PUT", "/api/v1/ai/config"},
{"POST", "/api/v1/ai/config/test"}, {"POST", "/api/v1/ai/config/test"},
{"POST", "/api/v1/ai/analyze"}, // 重构后:整页分析改为浮窗助手(POST /ai/chat,admin + Pro 闸门)
{"POST", "/api/v1/ai/chat"},
{"GET", "/api/v1/system/license"},
{"POST", "/api/v1/system/license/activate"},
{"GET", "/api/v1/ai/runs"}, {"GET", "/api/v1/ai/runs"},
{"GET", "/api/v1/ai/runs/:id"}, {"GET", "/api/v1/ai/runs/:id"},
// 备份恢复接口已在上游被移除(commit f87fb4b),这里不再断言 // 备份恢复接口已在上游被移除(commit f87fb4b),这里不再断言