Skip to content

[测试/HIGH] integration-tests 目录缺失,test:e2e / test:integration:* 脚本失效 #34

@appergb

Description

@appergb

问题

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:citest:scripts 仍可跑,但端到端覆盖在当前 checkout 中实际为零
  • 对新贡献者有误导:以为有 E2E 测试,实际没有。

建议(任选其一)

  1. 补回 integration-tests/(含 run-tests.js 与用例);或
  2. 暂时移除 / 注释这些脚本,并在 README 注明 E2E 暂不可用;或
  3. 把它们改成占位脚本并打印「集成测试未随开源版本提供」。

本 issue 来自对 opensource 分支的一次代码审计(共 8 条,按严重程度拆分),结论均含 文件:行号 出处,欢迎指正。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions