mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-28 12:41:17 +00:00
fix(update): skip plugins switched through ClawHub
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
resolvePostCoreUpdateChildStdio,
|
||||
resolvePostUpdateServiceStateReadEnv,
|
||||
resolvePostInstallDoctorEnv,
|
||||
resolvePostSyncPluginUpdateSkipIds,
|
||||
shouldPrepareUpdatedInstallRestart,
|
||||
resolveUpdatedGatewayRestartPort,
|
||||
shouldUseLegacyProcessRestartAfterUpdate,
|
||||
@@ -541,6 +542,18 @@ describe("collectMissingPluginInstallPayloads", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolvePostSyncPluginUpdateSkipIds", () => {
|
||||
it("skips plugins already switched through ClawHub or npm and repaired payloads", () => {
|
||||
expect(
|
||||
resolvePostSyncPluginUpdateSkipIds({
|
||||
switchedToClawHub: ["whatsapp"],
|
||||
switchedToNpm: ["voice-call"],
|
||||
repairedMissingPayloadIds: new Set(["telegram"]),
|
||||
}),
|
||||
).toStrictEqual(new Set(["whatsapp", "voice-call", "telegram"]));
|
||||
});
|
||||
});
|
||||
|
||||
describe("shouldUseLegacyProcessRestartAfterUpdate", () => {
|
||||
it("never restarts package updates through the pre-update process", () => {
|
||||
expect(shouldUseLegacyProcessRestartAfterUpdate({ updateMode: "npm" })).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user