fix(test): align plugin gauntlet with built runtime

This commit is contained in:
Vincent Koc
2026-05-03 13:17:14 -07:00
parent b726214cf3
commit 53cc52981b
4 changed files with 82 additions and 6 deletions

View File

@@ -53,8 +53,8 @@ describe("plugin gateway gauntlet helpers", () => {
);
await writeManifest(
"beta",
"openclaw.plugin.json5",
`{ id: "beta", commandAliases: ["dreaming"], onboardingScopes: ["memory"] }`,
"openclaw.plugin.json",
JSON.stringify({ id: "beta", commandAliases: ["dreaming"], onboardingScopes: ["memory"] }),
);
const matrix = discoverBundledPluginManifests(repoRoot);
@@ -77,6 +77,15 @@ describe("plugin gateway gauntlet helpers", () => {
]);
});
it("skips source-only plugin dirs that are excluded from the built runtime", async () => {
await writeManifest("qqbot", "openclaw.plugin.json", JSON.stringify({ id: "qqbot" }));
await writeManifest("telegram", "openclaw.plugin.json", JSON.stringify({ id: "telegram" }));
const matrix = discoverBundledPluginManifests(repoRoot);
expect(matrix.map((entry) => entry.id)).toEqual(["telegram"]);
});
it("selects plugin shards after explicit id filtering", () => {
const entries = ["a", "b", "c", "d"].map((id) => ({ id }));