test: disable Parallels smoke idle watchdog

This commit is contained in:
Peter Steinberger
2026-05-01 09:51:33 +01:00
parent c9828635a8
commit 9e01d19db3
6 changed files with 10 additions and 41 deletions

View File

@@ -101,8 +101,6 @@ const defaultOptions = (): LinuxOptions => ({
vmNameExplicit: false,
});
const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
function usage(): string {
return `Usage: bash scripts/e2e/parallels-linux-smoke.sh [options]
@@ -674,14 +672,6 @@ rm -rf /root/.openclaw/test-bad-plugin`);
private verifyLocalTurn(): void {
this.guestExec(["openclaw", "models", "set", this.auth.modelId]);
this.guestExec([
"openclaw",
"config",
"set",
`models.providers.${this.options.provider}.timeoutSeconds`,
String(agentModelTimeoutSeconds),
"--strict-json",
]);
this.guestExec([
"openclaw",
"config",
@@ -694,7 +684,7 @@ rm -rf /root/.openclaw/test-bad-plugin`);
this.guestBash(
`exec /usr/bin/env ${shellQuote(`${this.auth.apiKeyEnv}=${this.auth.apiKeyValue}`)} openclaw agent --local --agent main --session-id parallels-linux-smoke --message ${shellQuote(
"Reply with exact ASCII text OK only.",
)} --json`,
)} --timeout 0 --json`,
);
}

View File

@@ -95,7 +95,6 @@ const guestOpenClaw = "/opt/homebrew/bin/openclaw";
const guestOpenClawEntry = "/opt/homebrew/lib/node_modules/openclaw/openclaw.mjs";
const guestNode = "/opt/homebrew/bin/node";
const guestNpm = "/opt/homebrew/bin/npm";
const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
const defaultOptions = (): MacosOptions => ({
discordChannelId: undefined,
@@ -964,15 +963,6 @@ exit 1`);
private verifyTurn(): void {
this.guestExec([guestNode, guestOpenClawEntry, "models", "set", this.auth.modelId]);
this.guestExec([
guestNode,
guestOpenClawEntry,
"config",
"set",
`models.providers.${this.options.provider}.timeoutSeconds`,
String(agentModelTimeoutSeconds),
"--strict-json",
]);
this.guestExec([
guestNode,
guestOpenClawEntry,
@@ -986,7 +976,7 @@ exit 1`);
`${posixAgentWorkspaceScript("Parallels macOS smoke test assistant.")}
exec /usr/bin/env ${shellQuote(`${this.auth.apiKeyEnv}=${this.auth.apiKeyValue}`)} ${guestNode} ${guestOpenClawEntry} agent --local --agent main --session-id parallels-macos-smoke --message ${shellQuote(
"Reply with exact ASCII text OK only.",
)} --json`,
)} --timeout 0 --json`,
);
}

View File

@@ -1,17 +1,14 @@
import { posixAgentWorkspaceScript, windowsAgentWorkspaceScript } from "./agent-workspace.ts";
import { shellQuote } from "./host-command.ts";
import { psSingleQuote, windowsOpenClawResolver } from "./powershell.ts";
import type { Provider, ProviderAuth } from "./types.ts";
import type { ProviderAuth } from "./types.ts";
export interface NpmUpdateScriptInput {
auth: ProviderAuth;
expectedNeedle: string;
provider: Provider;
updateTarget: string;
}
const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
export function macosUpdateScript(input: NpmUpdateScriptInput): string {
return String.raw`set -euo pipefail
export PATH=/opt/homebrew/bin:/opt/homebrew/opt/node/bin:/opt/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin
@@ -73,10 +70,9 @@ ${posixVersionCheck("/opt/homebrew/bin/openclaw", input.expectedNeedle)}
start_openclaw_gateway
wait_for_gateway
/opt/homebrew/bin/openclaw models set ${shellQuote(input.auth.modelId)}
/opt/homebrew/bin/openclaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} /opt/homebrew/bin/openclaw agent --local --agent main --session-id parallels-npm-update-macos --message 'Reply with exact ASCII text OK only.' --json`;
${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} /opt/homebrew/bin/openclaw agent --local --agent main --session-id parallels-npm-update-macos --message 'Reply with exact ASCII text OK only.' --timeout 0 --json`;
}
export function windowsUpdateScript(input: NpmUpdateScriptInput): string {
@@ -144,11 +140,10 @@ if ($LASTEXITCODE -ne 0) {
}
Wait-OpenClawGateway
Invoke-OpenClaw models set ${psSingleQuote(input.auth.modelId)}
Invoke-OpenClaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
${windowsAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
Set-Item -Path ('Env:' + ${psSingleQuote(input.auth.apiKeyEnv)}) -Value ${psSingleQuote(input.auth.apiKeyValue)}
Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --json`;
Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --timeout 0 --json`;
}
export function linuxUpdateScript(input: NpmUpdateScriptInput): string {
@@ -207,10 +202,9 @@ ${posixVersionCheck("openclaw", input.expectedNeedle)}
start_openclaw_gateway
wait_for_gateway
openclaw models set ${shellQuote(input.auth.modelId)}
openclaw config set models.providers.${input.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
openclaw config set agents.defaults.skipBootstrap true --strict-json
${posixAgentWorkspaceScript("Parallels npm update smoke test assistant.")}
${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} openclaw agent --local --agent main --session-id parallels-npm-update-linux --message 'Reply with exact ASCII text OK only.' --json`;
${input.auth.apiKeyEnv}=${shellQuote(input.auth.apiKeyValue)} openclaw agent --local --agent main --session-id parallels-npm-update-linux --message 'Reply with exact ASCII text OK only.' --timeout 0 --json`;
}
function posixVersionCheck(command: string, expectedNeedle: string): string {

View File

@@ -378,7 +378,6 @@ class NpmUpdateSmoke {
const input = {
auth: this.auth,
expectedNeedle: this.updateExpectedNeedle,
provider: this.options.provider,
updateTarget: this.updateTargetEffective,
};
switch (platform) {

View File

@@ -102,8 +102,6 @@ const defaultOptions = (): WindowsOptions => ({
vmName: "Windows 11",
});
const agentModelTimeoutSeconds = Number(process.env.OPENCLAW_PARALLELS_MODEL_TIMEOUT_S || 300);
function usage(): string {
return `Usage: bash scripts/e2e/parallels-windows-smoke.sh [options]
@@ -881,8 +879,6 @@ if ($LASTEXITCODE -ne 0) { throw "gateway ${action} failed with exit code $LASTE
$PSNativeCommandUseErrorActionPreference = $false
Invoke-OpenClaw models set ${psSingleQuote(this.auth.modelId)}
if ($LASTEXITCODE -ne 0) { throw "models set failed" }
Invoke-OpenClaw config set models.providers.${this.options.provider}.timeoutSeconds ${agentModelTimeoutSeconds} --strict-json
if ($LASTEXITCODE -ne 0) { throw "provider timeout config set failed" }
Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
if ($LASTEXITCODE -ne 0) { throw "config set failed" }
${windowsAgentWorkspaceScript("Parallels Windows smoke test assistant.")}
@@ -896,6 +892,8 @@ $args = ${psArray([
"parallels-windows-smoke",
"--message",
"Reply with exact ASCII text OK only.",
"--timeout",
"0",
"--json",
])}
$output = Invoke-OpenClaw @args 2>&1

View File

@@ -283,15 +283,13 @@ console.log(resolveUbuntuVmName("Ubuntu missing"));
expect(script, scriptPath).toContain("AgentWorkspaceScript");
expect(script, scriptPath).toContain("parallels-");
expect(script, scriptPath).toContain("agents.defaults.skipBootstrap");
expect(script, scriptPath).toContain("OPENCLAW_PARALLELS_MODEL_TIMEOUT_S");
expect(script, scriptPath).toContain("timeoutSeconds");
expect(script, scriptPath).toContain("--timeout");
}
const npmUpdateScripts = readFileSync(TS_PATHS.npmUpdateScripts, "utf8");
expect(npmUpdateScripts).toContain("posixAgentWorkspaceScript");
expect(npmUpdateScripts).toContain("windowsAgentWorkspaceScript");
expect(npmUpdateScripts).toContain("OPENCLAW_PARALLELS_MODEL_TIMEOUT_S");
expect(npmUpdateScripts).toContain("timeoutSeconds");
expect(npmUpdateScripts).toContain("--timeout 0");
});
it("clears phase timers and applies phase deadlines to guest commands", () => {