From b5a90b066dc881bbd543e2e1ff274edd1b7b9665 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 29 Apr 2026 03:15:25 +0100 Subject: [PATCH] refactor: reuse docker gateway e2e helpers --- docs/reference/test.md | 4 +- scripts/e2e/browser-cdp-snapshot-docker.sh | 34 ++++++---------- scripts/e2e/config-reload-source-docker.sh | 45 ++++++---------------- scripts/e2e/gateway-network-docker.sh | 26 ++----------- scripts/e2e/openwebui-docker.sh | 6 +-- scripts/lib/openclaw-e2e-instance.sh | 24 ++++++++++++ 6 files changed, 58 insertions(+), 81 deletions(-) diff --git a/docs/reference/test.md b/docs/reference/test.md index db52c06a23d..fec63687c3d 100644 --- a/docs/reference/test.md +++ b/docs/reference/test.md @@ -16,7 +16,9 @@ title: "Tests" - `pnpm check:changed`: runs the smart changed check gate for the diff against `origin/main`. It runs typecheck, lint, and guard commands for the affected architectural lanes, but does not run Vitest tests. Use `pnpm test:changed` or explicit `pnpm test ` for test proof. - `pnpm test`: routes explicit file/directory targets through scoped Vitest lanes. Untargeted runs use fixed shard groups and expand to leaf configs for local parallel execution; the extension group always expands to the per-extension shard configs instead of one giant root-project process. - Test wrapper runs end with a short `[test] passed|failed|skipped ... in ...` summary. Vitest's own duration line stays the per-shard detail. -- Shared OpenClaw test state: use `src/test-utils/openclaw-test-state.ts` from Vitest when a test needs an isolated `HOME`, `OPENCLAW_STATE_DIR`, `OPENCLAW_CONFIG_PATH`, config fixture, workspace, agent dir, or auth-profile store. For process-level E2E tests that need a running Gateway, use `test/helpers/openclaw-test-instance.ts` so state, config, CLI env, gateway startup, log capture, and cleanup stay together. Docker/Bash E2E lanes that source `scripts/lib/docker-e2e-image.sh` can pass `docker_e2e_test_state_shell_b64