问题
package.json 定义了 E2E / 集成测试脚本,但它们依赖的 integration-tests/ 目录在仓库中不存在。
package.json:
"test:e2e": "npm run test:integration:sandbox:none -- --verbose --keep-output",
"test:integration:sandbox:none": "GEMINI_SANDBOX=false node integration-tests/run-tests.js",
"test:integration:sandbox:docker": "GEMINI_SANDBOX=docker node integration-tests/run-tests.js",
"test:integration:sandbox:podman": "GEMINI_SANDBOX=podman node integration-tests/run-tests.js",
实际检查:
$ ls integration-tests
ls: integration-tests: No such file or directory
$ git ls-files integration-tests | wc -l
0
该目录既不在磁盘上,也未被 git 跟踪,也没有被 .gitignore 忽略——推测是开源 fork 时被剥离,但脚本未同步移除。
影响
npm run test:e2e / npm run test:integration:* 直接报「找不到文件」而失败。
npm run test:ci 经 test:scripts 仍可跑,但端到端覆盖在当前 checkout 中实际为零。
- 对新贡献者有误导:以为有 E2E 测试,实际没有。
建议(任选其一)
- 补回
integration-tests/(含 run-tests.js 与用例);或
- 暂时移除 / 注释这些脚本,并在 README 注明 E2E 暂不可用;或
- 把它们改成占位脚本并打印「集成测试未随开源版本提供」。
本 issue 来自对 opensource 分支的一次代码审计(共 8 条,按严重程度拆分),结论均含 文件:行号 出处,欢迎指正。
问题
package.json定义了 E2E / 集成测试脚本,但它们依赖的integration-tests/目录在仓库中不存在。package.json:实际检查:
该目录既不在磁盘上,也未被 git 跟踪,也没有被
.gitignore忽略——推测是开源 fork 时被剥离,但脚本未同步移除。影响
npm run test:e2e/npm run test:integration:*直接报「找不到文件」而失败。npm run test:ci经test:scripts仍可跑,但端到端覆盖在当前 checkout 中实际为零。建议(任选其一)
integration-tests/(含run-tests.js与用例);或