refactor: simplify docker e2e harness scripts · openclaw/openclaw@8ac2dd4
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
File tree
openai-web-search-minimal
| Original file line number | Diff line number | Diff line change |
|---|
@@ -41,11 +41,12 @@ EOF
|
41 | 41 | echo "Building Docker image: $IMAGE_NAME" |
42 | 42 | docker_build_run browser-cdp-snapshot-build -t "$IMAGE_NAME" -f "$build_dir/Dockerfile" "$build_dir" |
43 | 43 | fi |
44 | | -docker_e2e_harness_mount_args |
45 | 44 | OPENCLAW_TEST_STATE_SCRIPT_B64="$(docker_e2e_test_state_shell_b64 browser-cdp-snapshot empty)" |
46 | 45 | |
47 | 46 | echo "Starting browser CDP snapshot container..." |
| 47 | +docker_e2e_harness_mount_args |
48 | 48 | docker_cmd docker run -d \ |
| 49 | +"${DOCKER_E2E_HARNESS_ARGS[@]}" \ |
49 | 50 | --name "$CONTAINER_NAME" \ |
50 | 51 | -e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ |
51 | 52 | -e OPENCLAW_GATEWAY_TOKEN="$TOKEN" \ |
@@ -56,7 +57,6 @@ docker_cmd docker run -d \
|
56 | 57 | -e OPENCLAW_SKIP_CRON=1 \ |
57 | 58 | -e OPENCLAW_SKIP_CANVAS_HOST=1 \ |
58 | 59 | -e "OPENCLAW_TEST_STATE_SCRIPT_B64=$OPENCLAW_TEST_STATE_SCRIPT_B64" \ |
59 | | -"${DOCKER_E2E_HARNESS_ARGS[@]}" \ |
60 | 60 | "$IMAGE_NAME" \ |
61 | 61 | bash -lc "set -euo pipefail |
62 | 62 | source scripts/lib/openclaw-e2e-instance.sh |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,5 +48,4 @@ prepare_package_tgz
|
48 | 48 | docker_e2e_package_mount_args "$PACKAGE_TGZ" |
49 | 49 | docker_e2e_harness_mount_args |
50 | 50 | |
51 | | - |
52 | 51 | run_bundled_channel_runtime_dep_scenarios |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,11 +16,10 @@ cleanup() {
|
16 | 16 | trap cleanup EXIT |
17 | 17 | |
18 | 18 | docker_e2e_build_or_reuse "$IMAGE_NAME" config-reload "$ROOT_DIR/scripts/e2e/Dockerfile" "$ROOT_DIR" "" "$SKIP_BUILD" |
19 | | -docker_e2e_harness_mount_args |
20 | 19 | OPENCLAW_TEST_STATE_SCRIPT_B64="$(docker_e2e_test_state_shell_b64 config-reload empty)" |
21 | 20 | |
22 | 21 | echo "Starting gateway container..." |
23 | | -docker run -d \ |
| 22 | +docker_e2e_run_detached_with_harness \ |
24 | 23 | --name "$CONTAINER_NAME" \ |
25 | 24 | -e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 \ |
26 | 25 | -e GATEWAY_AUTH_TOKEN_REF="$TOKEN" \ |
@@ -30,7 +29,6 @@ docker run -d \
|
30 | 29 | -e OPENCLAW_SKIP_CRON=1 \ |
31 | 30 | -e OPENCLAW_SKIP_CANVAS_HOST=1 \ |
32 | 31 | -e "OPENCLAW_TEST_STATE_SCRIPT_B64=$OPENCLAW_TEST_STATE_SCRIPT_B64" \ |
33 | | -"${DOCKER_E2E_HARNESS_ARGS[@]}" \ |
34 | 32 | "$IMAGE_NAME" \ |
35 | 33 | bash -lc "set -euo pipefail |
36 | 34 | source scripts/lib/openclaw-e2e-instance.sh |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -18,13 +18,12 @@ cleanup() {
|
18 | 18 | trap cleanup EXIT |
19 | 19 | |
20 | 20 | docker_e2e_build_or_reuse "$IMAGE_NAME" cron-mcp-cleanup |
21 | | -docker_e2e_harness_mount_args |
22 | 21 | OPENCLAW_TEST_STATE_SCRIPT_B64="$(docker_e2e_test_state_shell_b64 cron-mcp-cleanup empty)" |
23 | 22 | |
24 | 23 | echo "Running in-container cron/subagent MCP cleanup smoke..." |
25 | 24 | # Harness files are mounted read-only; the app under test comes from /app/dist. |
26 | 25 | set +e |
27 | | -docker run --rm \ |
| 26 | +docker_e2e_run_with_harness \ |
28 | 27 | --name "$CONTAINER_NAME" \ |
29 | 28 | -e "OPENCLAW_TEST_FAST=1" \ |
30 | 29 | -e "OPENCLAW_GATEWAY_TOKEN=$TOKEN" \ |
@@ -37,7 +36,6 @@ docker run --rm \
|
37 | 36 | -e "GW_URL=ws://127.0.0.1:$PORT" \ |
38 | 37 | -e "GW_TOKEN=$TOKEN" \ |
39 | 38 | -e "OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1" \ |
40 | | -"${DOCKER_E2E_HARNESS_ARGS[@]}" \ |
41 | 39 | "$IMAGE_NAME" \ |
42 | 40 | bash -lc "set -euo pipefail |
43 | 41 | source scripts/lib/openclaw-e2e-instance.sh |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。