From 7719dd88047c47f2c0c714e6d160af756c2a62c4 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 1 May 2026 12:28:21 +0100 Subject: [PATCH] test: use built-in OpenAI provider in Windows smoke --- scripts/e2e/parallels/npm-update-scripts.ts | 14 -------------- scripts/e2e/parallels/windows-smoke.ts | 14 -------------- test/scripts/parallels-smoke-model.test.ts | 4 ++-- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/scripts/e2e/parallels/npm-update-scripts.ts b/scripts/e2e/parallels/npm-update-scripts.ts index 1071a4d5e43..8d2dd64b969 100644 --- a/scripts/e2e/parallels/npm-update-scripts.ts +++ b/scripts/e2e/parallels/npm-update-scripts.ts @@ -144,20 +144,6 @@ 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 -$configPath = Join-Path $env:USERPROFILE '.openclaw\\openclaw.json' -$config = Get-Content $configPath -Raw | ConvertFrom-Json -if ($null -eq $config.models) { - $config | Add-Member -MemberType NoteProperty -Name models -Value ([pscustomobject]@{}) -} -if ($null -eq $config.models.providers) { - $config.models | Add-Member -MemberType NoteProperty -Name providers -Value ([pscustomobject]@{}) -} -$config.models.providers | Add-Member -Force -MemberType NoteProperty -Name openai -Value ([pscustomobject]@{ - baseUrl = 'https://api.openai.com/v1' - models = @() - timeoutSeconds = 300 -}) -$config | ConvertTo-Json -Depth 100 | Set-Content -Path $configPath -Encoding utf8 $sessionPath = Join-Path $env:USERPROFILE '.openclaw\\agents\\main\\sessions\\parallels-npm-update-windows.jsonl' Remove-Item $sessionPath -Force -ErrorAction SilentlyContinue ${windowsAgentWorkspaceScript("Parallels npm update smoke test assistant.")} diff --git a/scripts/e2e/parallels/windows-smoke.ts b/scripts/e2e/parallels/windows-smoke.ts index 6b292d7d3cb..80542da8dad 100755 --- a/scripts/e2e/parallels/windows-smoke.ts +++ b/scripts/e2e/parallels/windows-smoke.ts @@ -891,20 +891,6 @@ 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" } -$configPath = Join-Path $env:USERPROFILE '.openclaw\\openclaw.json' -$config = Get-Content $configPath -Raw | ConvertFrom-Json -if ($null -eq $config.models) { - $config | Add-Member -MemberType NoteProperty -Name models -Value ([pscustomobject]@{}) -} -if ($null -eq $config.models.providers) { - $config.models | Add-Member -MemberType NoteProperty -Name providers -Value ([pscustomobject]@{}) -} -$config.models.providers | Add-Member -Force -MemberType NoteProperty -Name openai -Value ([pscustomobject]@{ - baseUrl = 'https://api.openai.com/v1' - models = @() - timeoutSeconds = 300 -}) -$config | ConvertTo-Json -Depth 100 | Set-Content -Path $configPath -Encoding utf8 $sessionPath = Join-Path $env:USERPROFILE '.openclaw\\agents\\main\\sessions\\parallels-windows-smoke.jsonl' Remove-Item $sessionPath -Force -ErrorAction SilentlyContinue ${windowsAgentWorkspaceScript("Parallels Windows smoke test assistant.")} diff --git a/test/scripts/parallels-smoke-model.test.ts b/test/scripts/parallels-smoke-model.test.ts index 9e06e0f5382..65b5166a53a 100644 --- a/test/scripts/parallels-smoke-model.test.ts +++ b/test/scripts/parallels-smoke-model.test.ts @@ -452,8 +452,8 @@ console.log(JSON.stringify(result)); expect(script).toContain('guestPowerShellBackground(\n "agent-turn"'); expect(script).toContain("OPENCLAW_PARALLELS_WINDOWS_AGENT_TIMEOUT_S"); expect(script).toContain("finalAssistant(Raw|Visible)Text"); - expect(script).toContain("$config.models.providers"); - expect(script).toContain("timeoutSeconds = 300"); + expect(script).not.toContain("$config.models.providers"); + expect(script).not.toContain("timeoutSeconds = 300"); expect(script).toContain("parallels-windows-smoke.jsonl"); });