mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:20:43 +00:00
test: minimize Parallels smoke agent turns
This commit is contained in:
@@ -695,11 +695,12 @@ rm -rf /root/.openclaw/test-bad-plugin`);
|
||||
"true",
|
||||
"--strict-json",
|
||||
]);
|
||||
this.guestExec(["openclaw", "config", "set", "tools.profile", '"minimal"', "--strict-json"]);
|
||||
this.prepareAgentWorkspace();
|
||||
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.",
|
||||
)} --timeout 0 --json`,
|
||||
)} --thinking minimal --json`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -972,11 +972,20 @@ exit 1`);
|
||||
"true",
|
||||
"--strict-json",
|
||||
]);
|
||||
this.guestExec([
|
||||
guestNode,
|
||||
guestOpenClawEntry,
|
||||
"config",
|
||||
"set",
|
||||
"tools.profile",
|
||||
'"minimal"',
|
||||
"--strict-json",
|
||||
]);
|
||||
this.guestSh(
|
||||
`${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.",
|
||||
)} --timeout 0 --json`,
|
||||
)} --thinking minimal --json`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,8 +71,9 @@ start_openclaw_gateway
|
||||
wait_for_gateway
|
||||
/opt/homebrew/bin/openclaw models set ${shellQuote(input.auth.modelId)}
|
||||
/opt/homebrew/bin/openclaw config set agents.defaults.skipBootstrap true --strict-json
|
||||
/opt/homebrew/bin/openclaw config set tools.profile '"minimal"' --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.' --timeout 0 --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.' --thinking minimal --json`;
|
||||
}
|
||||
|
||||
export function windowsUpdateScript(input: NpmUpdateScriptInput): string {
|
||||
@@ -141,9 +142,10 @@ if ($LASTEXITCODE -ne 0) {
|
||||
Wait-OpenClawGateway
|
||||
Invoke-OpenClaw models set ${psSingleQuote(input.auth.modelId)}
|
||||
Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
|
||||
Invoke-OpenClaw config set tools.profile '"minimal"' --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.' --timeout 0 --json`;
|
||||
Invoke-OpenClaw agent --local --agent main --session-id parallels-npm-update-windows --message 'Reply with exact ASCII text OK only.' --thinking minimal --json`;
|
||||
}
|
||||
|
||||
export function linuxUpdateScript(input: NpmUpdateScriptInput): string {
|
||||
@@ -203,8 +205,9 @@ start_openclaw_gateway
|
||||
wait_for_gateway
|
||||
openclaw models set ${shellQuote(input.auth.modelId)}
|
||||
openclaw config set agents.defaults.skipBootstrap true --strict-json
|
||||
openclaw config set tools.profile '"minimal"' --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.' --timeout 0 --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.' --thinking minimal --json`;
|
||||
}
|
||||
|
||||
function posixVersionCheck(command: string, expectedNeedle: string): string {
|
||||
|
||||
@@ -881,6 +881,8 @@ Invoke-OpenClaw models set ${psSingleQuote(this.auth.modelId)}
|
||||
if ($LASTEXITCODE -ne 0) { throw "models set failed" }
|
||||
Invoke-OpenClaw config set agents.defaults.skipBootstrap true --strict-json
|
||||
if ($LASTEXITCODE -ne 0) { throw "config set failed" }
|
||||
Invoke-OpenClaw config set tools.profile '"minimal"' --strict-json
|
||||
if ($LASTEXITCODE -ne 0) { throw "tools profile config set failed" }
|
||||
${windowsAgentWorkspaceScript("Parallels Windows smoke test assistant.")}
|
||||
Set-Item -Path ('Env:' + ${psSingleQuote(this.auth.apiKeyEnv)}) -Value ${psSingleQuote(this.auth.apiKeyValue)}
|
||||
$args = ${psArray([
|
||||
@@ -892,8 +894,8 @@ $args = ${psArray([
|
||||
"parallels-windows-smoke",
|
||||
"--message",
|
||||
"Reply with exact ASCII text OK only.",
|
||||
"--timeout",
|
||||
"0",
|
||||
"--thinking",
|
||||
"minimal",
|
||||
"--json",
|
||||
])}
|
||||
$output = Invoke-OpenClaw @args 2>&1
|
||||
|
||||
@@ -289,13 +289,16 @@ 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("--timeout");
|
||||
expect(script, scriptPath).toContain("tools.profile");
|
||||
expect(script, scriptPath).toContain("--thinking");
|
||||
expect(script, scriptPath).toContain("minimal");
|
||||
}
|
||||
|
||||
const npmUpdateScripts = readFileSync(TS_PATHS.npmUpdateScripts, "utf8");
|
||||
expect(npmUpdateScripts).toContain("posixAgentWorkspaceScript");
|
||||
expect(npmUpdateScripts).toContain("windowsAgentWorkspaceScript");
|
||||
expect(npmUpdateScripts).toContain("--timeout 0");
|
||||
expect(npmUpdateScripts).toContain("tools.profile");
|
||||
expect(npmUpdateScripts).toContain("--thinking minimal");
|
||||
});
|
||||
|
||||
it("clears phase timers and applies phase deadlines to guest commands", () => {
|
||||
|
||||
Reference in New Issue
Block a user