惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
L
LangChain Blog
博客园_首页
Vercel News
Vercel News
月光博客
月光博客
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - Franky
C
Check Point Blog
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
罗磊的独立博客
D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
云风的 BLOG
云风的 BLOG
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test(onboard): guard docker e2e resources · openclaw/open...
vincentkoc · 2026-05-26 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -5,12 +5,43 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"

55

source "$ROOT_DIR/scripts/lib/docker-e2e-image.sh"

66

IMAGE_NAME="$(docker_e2e_resolve_image "openclaw-onboard-e2e" OPENCLAW_ONBOARD_E2E_IMAGE)"

77

OPENCLAW_TEST_STATE_FUNCTION_B64="$(docker_e2e_test_state_function_b64)"

8+

MAX_MEMORY_MIB="${OPENCLAW_ONBOARD_MAX_MEMORY_MIB:-2048}"

9+

MAX_CPU_PERCENT="${OPENCLAW_ONBOARD_MAX_CPU_PERCENT:-1200}"

10+

CONTAINER_NAME="openclaw-onboard-e2e-$$"

11+

RUN_LOG="$(mktemp "${TMPDIR:-/tmp}/openclaw-onboard.XXXXXX")"

12+

STATS_LOG="$(mktemp "${TMPDIR:-/tmp}/openclaw-onboard-stats.XXXXXX")"

13+
14+

cleanup() {

15+

docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true

16+

}

17+

trap cleanup EXIT

818
919

docker_e2e_build_or_reuse "$IMAGE_NAME" onboard

1020
1121

echo "Running onboarding E2E..."

12-

docker_e2e_run_with_harness -t \

22+

docker rm -f "$CONTAINER_NAME" >/dev/null 2>&1 || true

23+

docker_e2e_harness_mount_args

24+

docker run --name "$CONTAINER_NAME" "${DOCKER_E2E_HARNESS_ARGS[@]}" -t \

1325

-e "OPENCLAW_TEST_STATE_FUNCTION_B64=$OPENCLAW_TEST_STATE_FUNCTION_B64" \

14-

"$IMAGE_NAME" bash scripts/e2e/lib/onboard/scenario.sh

26+

"$IMAGE_NAME" bash scripts/e2e/lib/onboard/scenario.sh >"$RUN_LOG" 2>&1 &

27+

docker_pid="$!"

28+
29+

while kill -0 "$docker_pid" 2>/dev/null; do

30+

if docker inspect "$CONTAINER_NAME" >/dev/null 2>&1; then

31+

docker stats --no-stream --format '{{json .}}' "$CONTAINER_NAME" >>"$STATS_LOG" 2>/dev/null || true

32+

fi

33+

sleep 2

34+

done

35+
36+

set +e

37+

wait "$docker_pid"

38+

run_status="$?"

39+

set -e

40+
41+

cat "$RUN_LOG"

42+
43+

node scripts/e2e/lib/docker-stats/assert-resource-ceiling.mjs "$STATS_LOG" "$MAX_MEMORY_MIB" "$MAX_CPU_PERCENT" onboard

1544
45+

rm -f "$RUN_LOG" "$STATS_LOG"

1646

echo "E2E complete."

47+

exit "$run_status"

Original file line numberDiff line numberDiff line change

@@ -18,6 +18,7 @@ const OPENAI_WEB_SEARCH_MINIMAL_SCENARIO_PATH =

1818

const OPENAI_WEB_SEARCH_MINIMAL_CLIENT_PATH =

1919

"scripts/e2e/lib/openai-web-search-minimal/client.mjs";

2020

const OPENWEBUI_DOCKER_E2E_PATH = "scripts/e2e/openwebui-docker.sh";

21+

const ONBOARD_DOCKER_E2E_PATH = "scripts/e2e/onboard-docker.sh";

2122

const PLUGIN_BINDING_COMMAND_ESCAPE_DOCKER_E2E_PATH =

2223

"scripts/e2e/plugin-binding-command-escape-docker.sh";

2324

const PLUGIN_BINDING_COMMAND_ESCAPE_DOCKERFILE_PATH =

@@ -114,6 +115,17 @@ describe("docker build helper", () => {

114115

expect(dockerfile).toContain("procps");

115116

});

116117
118+

it("keeps onboarding Docker E2E resource-guarded", () => {

119+

const runner = readFileSync(ONBOARD_DOCKER_E2E_PATH, "utf8");

120+
121+

expect(runner).toContain("OPENCLAW_ONBOARD_MAX_MEMORY_MIB");

122+

expect(runner).toContain("OPENCLAW_ONBOARD_MAX_CPU_PERCENT");

123+

expect(runner).toContain("--name \"$CONTAINER_NAME\"");

124+

expect(runner).toContain("docker stats --no-stream");

125+

expect(runner).toContain("assert-resource-ceiling.mjs");

126+

expect(runner).not.toContain("docker_e2e_run_with_harness -t");

127+

});

128+
117129

it("copies root lifecycle scripts before cleanup-smoke installs dependencies", () => {

118130

const dockerfile = readFileSync(CLEANUP_SMOKE_DOCKERFILE_PATH, "utf8");

119131

const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile");