test(update): keep global install sidecar failure covered

This commit is contained in:
Vincent Koc
2026-05-02 23:59:23 -07:00
parent 95cee64ca6
commit f1da57a4a8

View File

@@ -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}`,
);
});