diff --git a/docs/help/testing.md b/docs/help/testing.md index 401f8ed5f08..7d93423a639 100644 --- a/docs/help/testing.md +++ b/docs/help/testing.md @@ -977,7 +977,7 @@ The live-model Docker runners also bind-mount only the needed CLI auth homes (or - Onboarding wizard (TTY, full scaffolding): `pnpm test:docker:onboard` (script: `scripts/e2e/onboard-docker.sh`) - Npm tarball onboarding/channel/agent smoke: `pnpm test:docker:npm-onboard-channel-agent` installs the packed OpenClaw tarball globally in Docker, configures OpenAI via env-ref onboarding plus Telegram by default, verifies enabling the plugin installs its runtime deps on demand, runs doctor, and runs one mocked OpenAI agent turn. Reuse a prebuilt tarball with `OPENCLAW_NPM_ONBOARD_PACKAGE_TGZ=/path/to/openclaw-*.tgz`, skip the host rebuild with `OPENCLAW_NPM_ONBOARD_HOST_BUILD=0`, or switch channel with `OPENCLAW_NPM_ONBOARD_CHANNEL=discord`. - Bun global install smoke: `bash scripts/e2e/bun-global-install-smoke.sh` packs the current tree, installs it with `bun install -g` in an isolated home, and verifies `openclaw infer image providers --json` returns bundled image providers instead of hanging. Reuse a prebuilt tarball with `OPENCLAW_BUN_GLOBAL_SMOKE_PACKAGE_TGZ=/path/to/openclaw-*.tgz`, skip the host build with `OPENCLAW_BUN_GLOBAL_SMOKE_HOST_BUILD=0`, or copy `dist/` from a built Docker image with `OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE=openclaw-dockerfile-smoke:local`. -- Installer Docker smoke: `bash scripts/test-install-sh-docker.sh` shares one npm cache across its root, update, direct-npm, and non-root containers. Set `OPENCLAW_INSTALL_SMOKE_NPM_CACHE_DIR=/path/to/cache` to reuse that cache across local reruns. +- Installer Docker smoke: `bash scripts/test-install-sh-docker.sh` shares one npm cache across its root, update, and direct-npm containers. Non-root installer checks keep an isolated npm cache so root-owned cache entries do not mask user-local install behavior. Set `OPENCLAW_INSTALL_SMOKE_NPM_CACHE_DIR=/path/to/cache` to reuse the root/update/direct-npm cache across local reruns. - Gateway networking (two containers, WS auth + health): `pnpm test:docker:gateway-network` (script: `scripts/e2e/gateway-network-docker.sh`) - OpenAI Responses web_search minimal reasoning regression: `pnpm test:docker:openai-web-search-minimal` (script: `scripts/e2e/openai-web-search-minimal-docker.sh`) runs a mocked OpenAI server through Gateway, verifies `web_search` raises `reasoning.effort` from `minimal` to `low`, then forces the provider schema reject and checks the raw detail appears in Gateway logs. - MCP channel bridge (seeded Gateway + stdio bridge + raw Claude notification-frame smoke): `pnpm test:docker:mcp-channels` (script: `scripts/e2e/mcp-channels-docker.sh`) diff --git a/scripts/test-install-sh-docker.sh b/scripts/test-install-sh-docker.sh index 4e51cbbc065..dd1ce687671 100755 --- a/scripts/test-install-sh-docker.sh +++ b/scripts/test-install-sh-docker.sh @@ -426,7 +426,6 @@ LATEST_VERSION="${LATEST_VERSION:-}" if [[ "$SKIP_NONROOT" == "1" ]]; then echo "==> Skip non-root installer smoke (OPENCLAW_INSTALL_SMOKE_SKIP_NONROOT=1)" else - prepare_npm_cache if [[ "$SKIP_NONROOT_IMAGE_BUILD" == "1" ]]; then echo "==> Reuse prebuilt non-root image: $NONROOT_IMAGE" else @@ -441,7 +440,6 @@ else echo "==> Run installer non-root test: $INSTALL_URL" docker run --rm -t \ --platform "$NONROOT_PLATFORM" \ - "${NPM_CACHE_DOCKER_ARGS[@]}" \ -e OPENCLAW_INSTALL_URL="$INSTALL_URL" \ -e OPENCLAW_INSTALL_PACKAGE="$PACKAGE_NAME" \ -e OPENCLAW_INSTALL_METHOD=npm \ @@ -466,7 +464,6 @@ echo "==> Run CLI installer non-root test (same image)" docker run --rm -t \ --platform "$NONROOT_PLATFORM" \ --entrypoint /bin/bash \ - "${NPM_CACHE_DOCKER_ARGS[@]}" \ -e OPENCLAW_INSTALL_URL="$INSTALL_URL" \ -e OPENCLAW_INSTALL_CLI_URL="$CLI_INSTALL_URL" \ -e OPENCLAW_NO_ONBOARD=1 \ diff --git a/test/scripts/test-install-sh-docker.test.ts b/test/scripts/test-install-sh-docker.test.ts index 50e29a0116b..ebfbdf490ae 100644 --- a/test/scripts/test-install-sh-docker.test.ts +++ b/test/scripts/test-install-sh-docker.test.ts @@ -95,6 +95,12 @@ describe("install-sh smoke runner", () => { expect(script).toContain('"${NPM_CACHE_DOCKER_ARGS[@]}"'); expect(script).toContain("remove_owned_npm_cache"); expect(script).toContain('sudo -n rm -rf "$NPM_CACHE_DIR"'); + expect(script).not.toMatch( + /Run installer non-root test:[\s\S]*"\$\{NPM_CACHE_DOCKER_ARGS\[@\]\}"/, + ); + expect(script).not.toMatch( + /Run CLI installer non-root test[\s\S]*"\$\{NPM_CACHE_DOCKER_ARGS\[@\]\}"/, + ); expect(script).toContain("==> Run direct npm global smoke"); expect(script).toContain("OPENCLAW_INSTALL_SMOKE_MODE=npm-global"); expect(runner).toContain("run_npm_global_smoke");