From f1ddaf46c774e969d2cde5da78dccda5f15efb7e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 13 May 2026 02:35:10 +0100 Subject: [PATCH] ci: avoid pnpm prompts in live docker tests --- scripts/test-live-acp-bind-docker.sh | 2 +- scripts/test-live-cli-backend-docker.sh | 2 +- scripts/test-live-codex-harness-docker.sh | 2 +- scripts/test-live-gateway-models-docker.sh | 2 +- scripts/test-live-models-docker.sh | 2 +- scripts/test-live.mjs | 3 +++ test/scripts/test-live-cli-backend-docker.test.ts | 9 +++++++++ 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/test-live-acp-bind-docker.sh b/scripts/test-live-acp-bind-docker.sh index 276dd018901..8c0a0f34ead 100644 --- a/scripts/test-live-acp-bind-docker.sh +++ b/scripts/test-live-acp-bind-docker.sh @@ -232,7 +232,7 @@ openclaw_live_stage_state_dir "$tmp_dir/.openclaw-state" openclaw_live_prepare_staged_config cd "$tmp_dir" export OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND="${OPENCLAW_LIVE_ACP_BIND_AGENT_COMMAND:-}" -pnpm test:live src/gateway/gateway-acp-bind.live.test.ts +node scripts/test-live.mjs -- src/gateway/gateway-acp-bind.live.test.ts EOF openclaw_live_acp_bind_append_build_extension acpx diff --git a/scripts/test-live-cli-backend-docker.sh b/scripts/test-live-cli-backend-docker.sh index 2f9de4c4f60..f5a55a9ee51 100644 --- a/scripts/test-live-cli-backend-docker.sh +++ b/scripts/test-live-cli-backend-docker.sh @@ -439,7 +439,7 @@ if [ "$provider" = "codex-cli" ] && [ "${OPENCLAW_LIVE_CLI_BACKEND_AUTH:-auto}" fi echo "==> Direct Codex CLI probe ok" fi -pnpm test:live src/gateway/gateway-cli-backend.live.test.ts +node scripts/test-live.mjs -- src/gateway/gateway-cli-backend.live.test.ts EOF OPENCLAW_LIVE_DOCKER_REPO_ROOT="$ROOT_DIR" "$TRUSTED_HARNESS_DIR/scripts/test-live-build-docker.sh" diff --git a/scripts/test-live-codex-harness-docker.sh b/scripts/test-live-codex-harness-docker.sh index 626c139d704..0427bae3655 100644 --- a/scripts/test-live-codex-harness-docker.sh +++ b/scripts/test-live-codex-harness-docker.sh @@ -253,7 +253,7 @@ if ! "$NPM_CONFIG_PREFIX/bin/codex" exec \ cat "$codex_preflight_log" >&2 exit 1 fi -pnpm test:live ${OPENCLAW_LIVE_CODEX_TEST_FILES:-src/gateway/gateway-codex-harness.live.test.ts} +node scripts/test-live.mjs -- ${OPENCLAW_LIVE_CODEX_TEST_FILES:-src/gateway/gateway-codex-harness.live.test.ts} EOF openclaw_live_codex_harness_append_build_extension codex diff --git a/scripts/test-live-gateway-models-docker.sh b/scripts/test-live-gateway-models-docker.sh index 5ddbb5b3a5f..718465e9939 100755 --- a/scripts/test-live-gateway-models-docker.sh +++ b/scripts/test-live-gateway-models-docker.sh @@ -162,7 +162,7 @@ openclaw_live_link_runtime_tree "$tmp_dir" openclaw_live_stage_state_dir "$tmp_dir/.openclaw-state" openclaw_live_prepare_staged_config cd "$tmp_dir" -pnpm test:live:gateway-profiles +node scripts/test-live.mjs -- src/gateway/gateway-models.profiles.live.test.ts EOF OPENCLAW_LIVE_DOCKER_REPO_ROOT="$ROOT_DIR" "$TRUSTED_HARNESS_DIR/scripts/test-live-build-docker.sh" diff --git a/scripts/test-live-models-docker.sh b/scripts/test-live-models-docker.sh index a842f0b485d..ad6e6ca293e 100755 --- a/scripts/test-live-models-docker.sh +++ b/scripts/test-live-models-docker.sh @@ -187,7 +187,7 @@ openclaw_live_link_runtime_tree "$tmp_dir" openclaw_live_stage_state_dir "$tmp_dir/.openclaw-state" openclaw_live_prepare_staged_config cd "$tmp_dir" -pnpm test:live:models-profiles +node scripts/test-live.mjs -- src/agents/models.profiles.live.test.ts EOF OPENCLAW_LIVE_DOCKER_REPO_ROOT="$ROOT_DIR" "$TRUSTED_HARNESS_DIR/scripts/test-live-build-docker.sh" diff --git a/scripts/test-live.mjs b/scripts/test-live.mjs index 30dabc5647d..22cf8e2c846 100644 --- a/scripts/test-live.mjs +++ b/scripts/test-live.mjs @@ -20,6 +20,9 @@ for (const arg of process.argv.slice(2)) { const env = { ...process.env, + CI: process.env.CI || "1", + PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN: process.env.PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN || "false", + pnpm_config_verify_deps_before_run: process.env.pnpm_config_verify_deps_before_run || "false", OPENCLAW_LIVE_TEST: process.env.OPENCLAW_LIVE_TEST || "1", OPENCLAW_LIVE_TEST_QUIET: quietOverride ?? process.env.OPENCLAW_LIVE_TEST_QUIET ?? "1", }; diff --git a/test/scripts/test-live-cli-backend-docker.test.ts b/test/scripts/test-live-cli-backend-docker.test.ts index 694053b46c3..e137afdb273 100644 --- a/test/scripts/test-live-cli-backend-docker.test.ts +++ b/test/scripts/test-live-cli-backend-docker.test.ts @@ -13,6 +13,15 @@ function readForwardedDockerEnvVars(): string[] { } describe("scripts/test-live-cli-backend-docker.sh", () => { + it("runs the staged live test without invoking pnpm inside Docker", () => { + const script = fs.readFileSync(SCRIPT_PATH, "utf8"); + + expect(script).toContain( + "node scripts/test-live.mjs -- src/gateway/gateway-cli-backend.live.test.ts", + ); + expect(script).not.toContain("pnpm test:live src/gateway/gateway-cli-backend.live.test.ts"); + }); + it("forwards both fresh and resume CLI arg overrides into the Docker container", () => { const forwardedVars = readForwardedDockerEnvVars();