



























@@ -2261,6 +2261,32 @@ fi
22612261expect(runner).toContain(
22622262'openclaw gateway --port "$PORT" --bind loopback --allow-unconfigured',
22632263);
2264+expect(runner).toContain(
2265+'PROBE_TIMEOUT_MS="$(openclaw_e2e_read_nonnegative_int_env OPENCLAW_UPGRADE_SURVIVOR_PROBE_TIMEOUT_MS 60000)"',
2266+);
2267+expect(runner).toContain(
2268+"openclaw_e2e_read_positive_int_env OPENCLAW_UPGRADE_SURVIVOR_PROBE_ATTEMPT_TIMEOUT_MS 5000",
2269+);
2270+expect(runner).toContain(
2271+"openclaw_e2e_read_positive_int_env OPENCLAW_UPGRADE_SURVIVOR_PROBE_MAX_BODY_BYTES 1048576",
2272+);
2273+expect(runner).toContain('-e OPENCLAW_UPGRADE_SURVIVOR_PROBE_TIMEOUT_MS="$PROBE_TIMEOUT_MS"');
2274+expect(runner).toContain(
2275+'-e OPENCLAW_UPGRADE_SURVIVOR_PROBE_ATTEMPT_TIMEOUT_MS="$PROBE_ATTEMPT_TIMEOUT_MS"',
2276+);
2277+expect(runner).toContain(
2278+'-e OPENCLAW_UPGRADE_SURVIVOR_PROBE_MAX_BODY_BYTES="$PROBE_MAX_BODY_BYTES"',
2279+);
2280+expect(runner).toContain("readyz_probe_args=(");
2281+expect(runner).toContain(
2282+'readyz_probe_args+=(--allow-failing "$OPENCLAW_UPGRADE_SURVIVOR_READYZ_ALLOW_FAILING")',
2283+);
2284+expect(runner).toContain("readyz_probe_args+=(--allow-degraded-ready)");
2285+expect(runner).toContain(
2286+'node scripts/e2e/lib/upgrade-survivor/probe-gateway.mjs "${readyz_probe_args[@]}"',
2287+);
2288+expect(runner).toContain("OPENCLAW_UPGRADE_SURVIVOR_READYZ_ALLOW_FAILING");
2289+expect(runner).toContain("OPENCLAW_UPGRADE_SURVIVOR_READYZ_ALLOW_DEGRADED");
2264229022652291expect(publishedRunner).toContain(
22662292'COMMAND_TIMEOUT="${OPENCLAW_UPGRADE_SURVIVOR_COMMAND_TIMEOUT:-900s}"',
23162342it.each([
23172343["start budget", "OPENCLAW_UPGRADE_SURVIVOR_START_BUDGET_SECONDS", "90s"],
23182344["status budget", "OPENCLAW_UPGRADE_SURVIVOR_STATUS_BUDGET_SECONDS", "30s"],
2345+["probe timeout", "OPENCLAW_UPGRADE_SURVIVOR_PROBE_TIMEOUT_MS", "soon"],
2346+["probe attempt timeout", "OPENCLAW_UPGRADE_SURVIVOR_PROBE_ATTEMPT_TIMEOUT_MS", "0"],
2347+["probe body cap", "OPENCLAW_UPGRADE_SURVIVOR_PROBE_MAX_BODY_BYTES", "64bytes"],
23192348])("rejects invalid upgrade survivor Docker %s before Docker setup", (_label, envName, value) => {
23202349const result = spawnSync("bash", [UPGRADE_SURVIVOR_DOCKER_E2E_PATH], {
23212350encoding: "utf8",
@@ -3863,6 +3892,30 @@ output="$(cat "$sampler_log")"
38633892expect(probe + runtimeSmoke, `${envName} consumed by probe/runtime smoke`).toContain(envName);
38643893}
38653894expect(runner).toContain("OPENCLAW_PLUGIN_LIFECYCLE_TRACE");
3895+for (const [envName, fallback] of [
3896+["OPENCLAW_BUNDLED_PLUGIN_LIST_TIMEOUT_MS", "30000"],
3897+["OPENCLAW_BUNDLED_PLUGIN_LIST_MAX_BUFFER_BYTES", "4194304"],
3898+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_OUTPUT_CHARS", "1048576"],
3899+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_LOG_SCAN_BYTES", "262144"],
3900+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_GATEWAY_LOG_BYTES", "16777216"],
3901+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_READY_MS", "900000"],
3902+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_MS", "60000"],
3903+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS", "210000"],
3904+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_WATCHDOG_MS", "1000"],
3905+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_COMMAND_MS", "120000"],
3906+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_HTTP_MS", "5000"],
3907+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_TEARDOWN_GRACE_MS", "10000"],
3908+["OPENCLAW_BUNDLED_PLUGIN_RUNTIME_TEARDOWN_KILL_GRACE_MS", "1000"],
3909+] as const) {
3910+expect(runner, `${envName} host validation`).toContain(
3911+`docker_e2e_read_positive_int_env ${envName} ${fallback}`,
3912+);
3913+expect(runner, `${envName} Docker forwarding`).toContain(`-e "${envName}=`);
3914+}
3915+expect(runner).toContain(
3916+"docker_e2e_read_tcp_port_env OPENCLAW_BUNDLED_PLUGIN_RUNTIME_PORT_BASE 19000",
3917+);
3918+expect(runner).toContain('-e "OPENCLAW_BUNDLED_PLUGIN_RUNTIME_PORT_BASE=$RUNTIME_PORT_BASE"');
38663919expect(runner).toContain("scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh");
38673920expect(runner).toContain('tee "$RUN_LOG"');
38683921expect(runner).not.toContain('cat "$RUN_LOG"');
@@ -3883,6 +3936,30 @@ output="$(cat "$sampler_log")"
38833936expect(sweep).toContain("assert-uninstalled");
38843937});
388539383939+it.each([
3940+["list timeout", "OPENCLAW_BUNDLED_PLUGIN_LIST_TIMEOUT_MS", "100ms"],
3941+["runtime port base", "OPENCLAW_BUNDLED_PLUGIN_RUNTIME_PORT_BASE", "99999"],
3942+["runtime log scan", "OPENCLAW_BUNDLED_PLUGIN_RUNTIME_LOG_SCAN_BYTES", "64bytes"],
3943+["runtime command timeout", "OPENCLAW_BUNDLED_PLUGIN_RUNTIME_COMMAND_MS", "soon"],
3944+["runtime teardown grace", "OPENCLAW_BUNDLED_PLUGIN_RUNTIME_TEARDOWN_GRACE_MS", "0"],
3945+])(
3946+"rejects invalid bundled plugin Docker %s values before Docker setup",
3947+(_label, envName, value) => {
3948+const result = spawnSync("bash", [BUNDLED_PLUGIN_INSTALL_UNINSTALL_E2E_PATH], {
3949+encoding: "utf8",
3950+env: {
3951+ ...process.env,
3952+OPENCLAW_SKIP_DOCKER_BUILD: "1",
3953+[envName]: value,
3954+},
3955+});
3956+3957+expect(result.status).toBe(2);
3958+expect(result.stderr).toContain(`invalid ${envName}: ${value}`);
3959+expect(result.stderr).not.toContain("Docker image not found");
3960+},
3961+);
3962+38863963it("passes installer tag env to bash, not curl", () => {
38873964const runner = readFileSync(INSTALL_E2E_RUNNER_PATH, "utf8");
38883965此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。