mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:20:43 +00:00
test(update): keep global install sidecar failure covered
This commit is contained in:
@@ -12,7 +12,7 @@ import { runGatewayUpdate } from "./update-runner.js";
|
||||
|
||||
type CommandResponse = { stdout?: string; stderr?: string; code?: number | null };
|
||||
type CommandResult = { stdout: string; stderr: string; code: number | null };
|
||||
const WHATSAPP_LIGHT_RUNTIME_API = bundledDistPluginFile("whatsapp", "light-runtime-api.js");
|
||||
const MATRIX_HELPER_API = bundledDistPluginFile("matrix", "helper-api.js");
|
||||
const fixtureRootTracker = createSuiteTempRootTracker({ prefix: "openclaw-update-" });
|
||||
|
||||
function toCommandResult(response?: CommandResponse): CommandResult {
|
||||
@@ -1557,7 +1557,7 @@ describe("runGatewayUpdate", () => {
|
||||
);
|
||||
await writeBundledRuntimeSidecars(pkgRoot);
|
||||
await writePackageDistInventory(pkgRoot);
|
||||
await fs.rm(path.join(pkgRoot, WHATSAPP_LIGHT_RUNTIME_API), { force: true });
|
||||
await fs.rm(path.join(pkgRoot, MATRIX_HELPER_API), { force: true });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1566,7 +1566,7 @@ describe("runGatewayUpdate", () => {
|
||||
expect(result.status).toBe("error");
|
||||
expect(result.reason).toBe("global-install-failed");
|
||||
expect(result.steps.at(-1)?.stderrTail).toContain(
|
||||
`missing packaged dist file ${WHATSAPP_LIGHT_RUNTIME_API}`,
|
||||
`missing packaged dist file ${MATRIX_HELPER_API}`,
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user