diff --git a/docs/superpowers/module-reports/module_mod-test-gate.md b/docs/superpowers/module-reports/module_mod-test-gate.md new file mode 100644 index 0000000..d657a12 --- /dev/null +++ b/docs/superpowers/module-reports/module_mod-test-gate.md @@ -0,0 +1,29 @@ +## Local test gate — module_mod + +执行时间: 2026-04-30 09:06 +08:00 + +### scripts/test.sh (subagent) +- 子会话: ab1e4a59987466d01 +- 命令: `bash scripts/test.sh` +- 退出码: 127 +- 通过: 未达到 / 失败: 未达到(脚本在第 1/6 步即终止) +- 关键 stdout (≤30 行): + +``` +[test.sh] 1/6 setup test db +[setup-test-db] 即将 DROP + CREATE `xlyweberp_vibe_erp_test` on 118.178.19.35:3318 +[setup-test-db] ⚠️ 目标是 **远程** host(已在 TEST_DB_ALLOWED_HOSTS 白名单中,每次 test.sh 都会 DROP) +[setup-test-db] 当前白名单: localhost 127.0.0.1 ::1 118.178.19.35 +[setup-test-db] 若不希望每次自动 DROP,从 .env.local 的 TEST_DB_ALLOWED_HOSTS 删掉此 host +./scripts/setup-test-db.sh: line 63: mysql: command not found +``` + +结论: red + +### 失败分析 + +退出码 127 = `mysql` 命令不在 PATH。`setup-test-db.sh` 在第 63 行调用 `mysql` 客户端 DROP+CREATE 测试库,但本机 PATH 上没有该可执行文件。`set -e` 触发 test.sh 立即退出,未跑到 backend 编译 / 测试 / frontend 段。 + +补充:项目当前阶段尚未引入 `frontend/` 目录(仅完成后端 4 个 REQ),`test.sh` 第 2/3/4 步对 `frontend/` 的依赖也会失败——需要在恢复路径中一并考虑。 + +属于「③ 环境/依赖问题」类,**非真实测试回归**:本模块已通过子会话独立跑 `mvn -B test` 67/67 全绿(见 docs/superpowers/reviews/2026-04-29-REQ-MOD-{001..004}.md 各自的 verify 证据)。