mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 13:30:42 +00:00
refactor: consolidate plugin install index store
This commit is contained in:
@@ -25,7 +25,7 @@ import {
|
||||
runtimeErrors,
|
||||
runtimeLogs,
|
||||
writeConfigFile,
|
||||
writePersistedPluginInstallLedger,
|
||||
writePersistedInstalledPluginIndexInstallRecords,
|
||||
} from "./plugins-cli-test-helpers.js";
|
||||
|
||||
const CLI_STATE_ROOT = "/tmp/openclaw-state";
|
||||
@@ -290,7 +290,7 @@ describe("plugins cli install", () => {
|
||||
expect(writeConfigFile).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("installs marketplace plugins and persists install ledger", async () => {
|
||||
it("installs marketplace plugins and persists plugin index", async () => {
|
||||
const cfg = {
|
||||
plugins: {
|
||||
entries: {},
|
||||
@@ -329,7 +329,7 @@ describe("plugins cli install", () => {
|
||||
await runPluginsCommand(["plugins", "install", "alpha", "--marketplace", "local/repo"]);
|
||||
|
||||
expect(clearPluginManifestRegistryCache).toHaveBeenCalledTimes(1);
|
||||
expect(writePersistedPluginInstallLedger).toHaveBeenCalledWith({
|
||||
expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({
|
||||
alpha: expect.objectContaining({
|
||||
source: "marketplace",
|
||||
installPath: cliInstallPath("alpha"),
|
||||
@@ -384,7 +384,7 @@ describe("plugins cli install", () => {
|
||||
spec: "clawhub:demo",
|
||||
}),
|
||||
);
|
||||
expect(writePersistedPluginInstallLedger).toHaveBeenCalledWith({
|
||||
expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({
|
||||
demo: expect.objectContaining({
|
||||
source: "clawhub",
|
||||
spec: "clawhub:demo@1.2.3",
|
||||
@@ -464,7 +464,7 @@ describe("plugins cli install", () => {
|
||||
}),
|
||||
);
|
||||
expect(installPluginFromNpmSpec).not.toHaveBeenCalled();
|
||||
expect(writePersistedPluginInstallLedger).toHaveBeenCalledWith({
|
||||
expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({
|
||||
demo: expect.objectContaining({
|
||||
source: "clawhub",
|
||||
spec: "clawhub:demo@1.2.3",
|
||||
|
||||
Reference in New Issue
Block a user