mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
test: preseed dev channel in Parallels update
This commit is contained in:
@@ -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`,
|
||||
|
||||
@@ -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`;
|
||||
|
||||
@@ -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)}
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user