test: preseed dev channel in Parallels update

This commit is contained in:
Peter Steinberger
2026-05-01 11:03:13 +01:00
parent 7ddf28c0d4
commit 9a051d2f9b
4 changed files with 25 additions and 2 deletions

View File

@@ -854,6 +854,14 @@ mkdir -p "$bootstrap_root"
`set -eu
rm -rf ${shellQuote(`${home}/openclaw`)}
export PATH=${shellQuote(`/tmp/openclaw-smoke-pnpm-bootstrap/node_modules/.bin:${guestPath}`)}
${guestNode} - <<'JS'
const fs = require("node:fs");
const path = require("node:path");
const configPath = path.join(process.env.HOME || ${JSON.stringify(home)}, ".openclaw", "openclaw.json");
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
config.update = { ...(config.update || {}), channel: "dev" };
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + "\\n");
JS
/usr/bin/env NODE_OPTIONS=--max-old-space-size=4096 OPENCLAW_DISABLE_BUNDLED_PLUGINS=1 ${guestNode} ${guestOpenClawEntry} update --channel dev --yes --json
${guestNode} ${guestOpenClawEntry} --version
${guestNode} ${guestOpenClawEntry} update status --json`,

View File

@@ -143,7 +143,7 @@ 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
Invoke-OpenClaw config set models.providers.openai '{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}' --strict-json
Invoke-OpenClaw config set models.providers.openai ${psSingleQuote('{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}')} --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.' --thinking minimal --json`;

View File

@@ -798,6 +798,13 @@ if ((Test-Path $logPath) -or (Test-Path $donePath)) {
$portableGit = Join-Path (Join-Path (Join-Path $env:LOCALAPPDATA 'OpenClaw\\deps') 'portable-git') ''
$env:PATH = "$portableGit\\cmd;$portableGit\\mingw64\\bin;$portableGit\\usr\\bin;$env:PATH"
where.exe git.exe
$configPath = Join-Path $env:USERPROFILE '.openclaw\\openclaw.json'
$config = Get-Content $configPath -Raw | ConvertFrom-Json
if ($null -eq $config.update) {
$config | Add-Member -MemberType NoteProperty -Name update -Value ([pscustomobject]@{})
}
$config.update | Add-Member -Force -MemberType NoteProperty -Name channel -Value 'dev'
$config | ConvertTo-Json -Depth 100 | Set-Content -Path $configPath -Encoding utf8
$env:OPENCLAW_DISABLE_BUNDLED_PLUGINS = '1'
Invoke-OpenClaw update --channel dev --yes --json
if ($LASTEXITCODE -ne 0) { throw "openclaw update failed with exit code $LASTEXITCODE" }
@@ -883,7 +890,7 @@ 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
if ($LASTEXITCODE -ne 0) { throw "tools profile config set failed" }
Invoke-OpenClaw config set models.providers.openai '{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}' --strict-json
Invoke-OpenClaw config set models.providers.openai ${psSingleQuote('{"baseUrl":"https://api.openai.com/v1","models":[],"timeoutSeconds":300}')} --strict-json
if ($LASTEXITCODE -ne 0) { throw "openai provider timeout config set failed" }
${windowsAgentWorkspaceScript("Parallels Windows smoke test assistant.")}
Set-Item -Path ('Env:' + ${psSingleQuote(this.auth.apiKeyEnv)}) -Value ${psSingleQuote(this.auth.apiKeyValue)}

View File

@@ -332,6 +332,14 @@ console.log(resolveUbuntuVmName("Ubuntu missing"));
expect(combined).toContain("where.exe git.exe");
});
it("preseeds dev update channel before stable-to-dev update lanes", () => {
const macos = readFileSync(TS_PATHS.macos, "utf8");
const windows = readFileSync(TS_PATHS.windows, "utf8");
expect(macos).toContain('channel: "dev"');
expect(windows).toContain("Name channel -Value 'dev'");
});
it("passes aggregate model overrides into each OS fresh lane", () => {
const script = readFileSync(TS_PATHS.npmUpdate, "utf8");