mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:10:43 +00:00
test: share doctor stale plugin fixture
This commit is contained in:
@@ -151,6 +151,17 @@ function channelManifest(id: string, channelId: string): TestManifestRecord {
|
||||
};
|
||||
}
|
||||
|
||||
function stalePluginConfig(id = "acpx") {
|
||||
return {
|
||||
plugins: {
|
||||
allow: [id],
|
||||
entries: {
|
||||
[id]: { enabled: true },
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
describe("doctor preview warnings", () => {
|
||||
beforeEach(() => {
|
||||
manifestState.plugins = [manifest("discord")];
|
||||
@@ -212,14 +223,7 @@ describe("doctor preview warnings", () => {
|
||||
|
||||
it("includes stale plugin config warnings", async () => {
|
||||
const warnings = await collectDoctorPreviewWarnings({
|
||||
cfg: {
|
||||
plugins: {
|
||||
allow: ["acpx"],
|
||||
entries: {
|
||||
acpx: { enabled: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
cfg: stalePluginConfig(),
|
||||
doctorFixCommand: "openclaw doctor --fix",
|
||||
});
|
||||
|
||||
@@ -260,14 +264,7 @@ describe("doctor preview warnings", () => {
|
||||
];
|
||||
|
||||
const warnings = await collectDoctorPreviewWarnings({
|
||||
cfg: {
|
||||
plugins: {
|
||||
allow: ["acpx"],
|
||||
entries: {
|
||||
acpx: { enabled: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
cfg: stalePluginConfig(),
|
||||
doctorFixCommand: "openclaw doctor --fix",
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user