mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-24 04:49:48 +00:00
fix(config): return persisted config write responses (#81445)
Merged via squash.
Prepared head SHA: 8f549e0621
Co-authored-by: giodl73-repo <235387111+giodl73-repo@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
This commit is contained in:
@@ -32,7 +32,15 @@ describe("commitConfigWithPendingPluginInstalls", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
mocks.loadInstalledPluginIndexInstallRecords.mockResolvedValue({});
|
||||
mocks.replaceConfigFile.mockResolvedValue(undefined);
|
||||
mocks.replaceConfigFile.mockImplementation(async (params: { nextConfig: OpenClawConfig }) => ({
|
||||
path: "/tmp/openclaw.json",
|
||||
previousHash: null,
|
||||
snapshot: {} as never,
|
||||
nextConfig: params.nextConfig,
|
||||
persistedHash: "test-config-hash",
|
||||
afterWrite: { mode: "auto" },
|
||||
followUp: { mode: "auto", requiresRestart: false },
|
||||
}));
|
||||
mocks.writePersistedInstalledPluginIndexInstallRecords.mockResolvedValue(undefined);
|
||||
});
|
||||
|
||||
@@ -95,6 +103,7 @@ describe("commitConfigWithPendingPluginInstalls", () => {
|
||||
...pendingRecords,
|
||||
},
|
||||
movedInstallRecords: true,
|
||||
persistedHash: "test-config-hash",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -184,6 +193,7 @@ describe("commitConfigWithPendingPluginInstalls", () => {
|
||||
config: nextConfig,
|
||||
installRecords: {},
|
||||
movedInstallRecords: false,
|
||||
persistedHash: "test-config-hash",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -205,6 +215,7 @@ describe("commitConfigWithPendingPluginInstalls", () => {
|
||||
config: nextConfig,
|
||||
installRecords: {},
|
||||
movedInstallRecords: false,
|
||||
persistedHash: null,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user