ci(engineering): Gitea Actions 门禁 + 前端测试设施 + 版本注入修复
- .gitea/workflows/ci.yml:后端 gofmt/vet/test + 前端 lint/test/build 双 job 门禁 - vitest + @testing-library + jsdom 落地,14 个命脉用例:useListQuery 乱序丢弃/卸载中止、 http.ts 401 单飞刷新+队列重放+失败登出+silent 直拒、审计防抖、StepDeploy 部署目标、query-utils - 版本注入断裂修复:main 补 buildTime/gitCommit 符号,build.sh/Dockerfile 注入 main.version, /health 返回真实版本,前端 package.json 版本对齐 2.0.0 - gofmt 清零(8 个存量未格式化文件)
This commit is contained in:
1 parent
2975452c21
commit
4f74fe6c3f
23 files changed
+1399
-77
No files matched your search
@@ -9,11 +9,14 @@ import (
|
||||
// 回归:接口的 **HTTP 方法与路径** 必须和前端调用一致。
|
||||
//
|
||||
// 线上事故:一次模糊匹配的 patch 把
|
||||
// logs.POST("/histogram", ...) → logs.GET("/histogram", ...)
|
||||
//
|
||||
// logs.POST("/histogram", ...) → logs.GET("/histogram", ...)
|
||||
//
|
||||
// 前端 logsApi.histogram 用的是 POST(body 里带 sourceId/query/start/end),
|
||||
// 于是所有直方图请求 404:
|
||||
// - 日志查询页:直方图不显示
|
||||
// - 日志分析页:直接报 "API endpoint not found",整页不可用
|
||||
//
|
||||
// 这类"方法写错"编译期完全查不出来,只能靠路由表断言。
|
||||
func TestCriticalRoutes(t *testing.T) {
|
||||
gin.SetMode(gin.TestMode)
|
||||
|
||||
Reference in new issue
Block a user