Skip to content

Commit 4ba2e81

Browse files
committed
test(config): isolate installed plugin ledger cache
1 parent 997f46c commit 4ba2e81

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/config/config.plugin-validation.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
22
import os from "node:os";
33
import path from "node:path";
44
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
5+
import { clearLoadInstalledPluginIndexInstallRecordsCache } from "../plugins/installed-plugin-index-record-reader.js";
56
import { validateConfigObjectWithPlugins } from "./validation.js";
67

78
vi.unmock("../version.js");
@@ -833,6 +834,7 @@ describe("config plugin validation", () => {
833834
it("uses persisted installed-plugin records as stale channel evidence", async () => {
834835
const installedPluginIndexPath = path.join(suiteHome, ".openclaw", "plugins", "installs.json");
835836
await mkdirSafe(path.dirname(installedPluginIndexPath));
837+
clearLoadInstalledPluginIndexInstallRecordsCache();
836838
await fs.writeFile(
837839
installedPluginIndexPath,
838840
JSON.stringify(
@@ -870,6 +872,7 @@ describe("config plugin validation", () => {
870872
});
871873
} finally {
872874
await fs.rm(installedPluginIndexPath, { force: true });
875+
clearLoadInstalledPluginIndexInstallRecordsCache();
873876
}
874877
});
875878

0 commit comments

Comments
 (0)