fix(e2e): validate bun smoke timeout env · openclaw/openclaw@9328f4a
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -614,6 +614,9 @@ describe("bun global install smoke", () => {
|
614 | 614 | expect(assertions).toContain("image providers output is missing bundled provider"); |
615 | 615 | expect(script).toContain("OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE"); |
616 | 616 | expect(script).toContain('source "$ROOT_DIR/scripts/lib/docker-e2e-container.sh"'); |
| 617 | +expect(script).toContain( |
| 618 | +'COMMAND_TIMEOUT_MS="$(read_positive_int_env OPENCLAW_BUN_GLOBAL_SMOKE_TIMEOUT_MS 180000)"', |
| 619 | +); |
617 | 620 | expect(script).toContain( |
618 | 621 | 'DOCKER_COMMAND_TIMEOUT="${DOCKER_COMMAND_TIMEOUT:-${OPENCLAW_BUN_GLOBAL_SMOKE_DOCKER_COMMAND_TIMEOUT:-600s}}"', |
619 | 622 | ); |
@@ -635,6 +638,20 @@ describe("bun global install smoke", () => {
|
635 | 638 | expect(script).not.toContain('\n rm -rf "$ROOT_DIR/dist"\n'); |
636 | 639 | }); |
637 | 640 | |
| 641 | +it("rejects invalid Bun global install command timeouts before Bun setup", () => { |
| 642 | +const result = spawnSync("bash", [BUN_GLOBAL_SMOKE_PATH], { |
| 643 | +encoding: "utf8", |
| 644 | +env: { |
| 645 | + ...process.env, |
| 646 | +OPENCLAW_BUN_GLOBAL_SMOKE_TIMEOUT_MS: "180000ms", |
| 647 | +}, |
| 648 | +}); |
| 649 | + |
| 650 | +expect(result.status).toBe(2); |
| 651 | +expect(result.stderr).toContain("invalid OPENCLAW_BUN_GLOBAL_SMOKE_TIMEOUT_MS: 180000ms"); |
| 652 | +expect(result.stderr).not.toContain("Bun is required"); |
| 653 | +}); |
| 654 | + |
638 | 655 | it("keeps npm pack tarball paths inside the Bun smoke pack directory", () => { |
639 | 656 | const script = readFileSync(BUN_GLOBAL_SMOKE_PATH, "utf8"); |
640 | 657 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。