mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 07:17:14 +00:00
fix(e2e): force Windows smoke gateway stop
This commit is contained in:
@@ -696,11 +696,12 @@ Invoke-OpenClaw update status --json`,
|
||||
}
|
||||
|
||||
private gatewayAction(action: "restart" | "stop"): Promise<void> {
|
||||
const forceFlag = action === "stop" ? " --force" : "";
|
||||
return this.guestPowerShellBackground(
|
||||
`gateway-${action}`,
|
||||
`$ErrorActionPreference = 'Continue'
|
||||
$PSNativeCommandUseErrorActionPreference = $false
|
||||
Invoke-OpenClaw gateway ${action}
|
||||
Invoke-OpenClaw gateway ${action}${forceFlag}
|
||||
if ($LASTEXITCODE -ne 0) { throw "gateway ${action} failed with exit code $LASTEXITCODE" }`,
|
||||
420_000,
|
||||
);
|
||||
|
||||
@@ -306,6 +306,12 @@ describe("Parallels smoke model selection", () => {
|
||||
expect(linux).toContain("rm -rf /root/.openclaw /root/.npm/_cacache");
|
||||
});
|
||||
|
||||
it("forces the explicit test-owned Windows gateway stop", () => {
|
||||
const windows = readFileSync(TS_PATHS.windows, "utf8");
|
||||
expect(windows).toContain('const forceFlag = action === "stop" ? " --force" : "";');
|
||||
expect(windows).toContain("Invoke-OpenClaw gateway ${action}${forceFlag}");
|
||||
});
|
||||
|
||||
it("preserves caller arguments when loaded as the Windows controller library", () => {
|
||||
const result = spawnSync(
|
||||
"bash",
|
||||
|
||||
Reference in New Issue
Block a user