mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:50:42 +00:00
fix: harden plugin install and uninstall transactions
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
recordHookInstall,
|
||||
recordPluginInstall,
|
||||
resetPluginsCliTestState,
|
||||
replaceConfigFile,
|
||||
runPluginsCommand,
|
||||
runtimeErrors,
|
||||
runtimeLogs,
|
||||
@@ -336,6 +337,12 @@ describe("plugins cli install", () => {
|
||||
}),
|
||||
});
|
||||
expect(writeConfigFile).toHaveBeenCalledWith(enabledCfg);
|
||||
expect(replaceConfigFile).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
baseHash: "mock",
|
||||
nextConfig: enabledCfg,
|
||||
}),
|
||||
);
|
||||
expect(runtimeLogs.some((line) => line.includes("slot adjusted"))).toBe(true);
|
||||
expect(runtimeLogs.some((line) => line.includes("Installed plugin: alpha"))).toBe(true);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user