惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
Y
Y Combinator Blog
V
V2EX
Engineering at Meta
Engineering at Meta
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
博客园 - 叶小钗
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
H
Help Net Security
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
WordPress大学
WordPress大学
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MongoDB | Blog
MongoDB | Blog
B
Blog
G
Google Developers Blog
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
N
Netflix TechBlog - Medium
腾讯CDC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
test: tighten plugin uninstall assertions · openclaw/open...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -24,6 +24,26 @@ const CLI_STATE_ROOT = "/tmp/openclaw-state";

2424

const ALPHA_INSTALL_PATH = installedPluginRoot(CLI_STATE_ROOT, "alpha");

2525

const ORIGINAL_OPENCLAW_NIX_MODE = process.env.OPENCLAW_NIX_MODE;

262627+

function expectRuntimeLogIncludes(fragment: string) {

28+

expect(runtimeLogs.some((message) => message.includes(fragment))).toBe(true);

29+

}

30+31+

function expectLatestUninstallPlanParams(expected: {

32+

pluginId: string;

33+

deleteFiles: boolean;

34+

channelIds?: unknown;

35+

}) {

36+

expect(planPluginUninstall).toHaveBeenCalled();

37+

const params = planPluginUninstall.mock.calls.at(-1)?.[0] as

38+

| { pluginId?: string; deleteFiles?: boolean; channelIds?: unknown }

39+

| undefined;

40+

expect(params?.pluginId).toBe(expected.pluginId);

41+

expect(params?.deleteFiles).toBe(expected.deleteFiles);

42+

if ("channelIds" in expected) {

43+

expect(params?.channelIds).toBe(expected.channelIds);

44+

}

45+

}

46+2747

describe("plugins cli uninstall", () => {

2848

beforeEach(() => {

2949

resetPluginsCliTestState();

@@ -104,12 +124,8 @@ describe("plugins cli uninstall", () => {

104124

expect(planPluginUninstall).toHaveBeenCalled();

105125

expect(writeConfigFile).not.toHaveBeenCalled();

106126

expect(refreshPluginRegistry).not.toHaveBeenCalled();

107-

expect(runtimeLogs).toEqual(

108-

expect.arrayContaining([expect.stringContaining("Dry run, no changes made.")]),

109-

);

110-

expect(runtimeLogs).toEqual(

111-

expect.arrayContaining([expect.stringContaining("context engine slot")]),

112-

);

127+

expectRuntimeLogIncludes("Dry run, no changes made.");

128+

expectRuntimeLogIncludes("context engine slot");

113129

});

114130115131

it("uninstalls with --force and --keep-files without prompting", async () => {

@@ -159,12 +175,7 @@ describe("plugins cli uninstall", () => {

159175

await runPluginsCommand(["plugins", "uninstall", "alpha", "--force", "--keep-files"]);

160176161177

expect(promptYesNo).not.toHaveBeenCalled();

162-

expect(planPluginUninstall).toHaveBeenCalledWith(

163-

expect.objectContaining({

164-

pluginId: "alpha",

165-

deleteFiles: false,

166-

}),

167-

);

178+

expectLatestUninstallPlanParams({ pluginId: "alpha", deleteFiles: false });

168179

expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({});

169180

expect(writeConfigFile).toHaveBeenCalledWith({

170181

plugins: {

@@ -393,12 +404,7 @@ describe("plugins cli uninstall", () => {

393404394405

await runPluginsCommand(["plugins", "uninstall", "alpha", "--force"]);

395406396-

expect(planPluginUninstall).toHaveBeenCalledWith(

397-

expect.objectContaining({

398-

pluginId: "alpha",

399-

deleteFiles: true,

400-

}),

401-

);

407+

expectLatestUninstallPlanParams({ pluginId: "alpha", deleteFiles: true });

402408

expect(writeConfigFile).toHaveBeenCalledWith(nextConfig);

403409

expect(runtimeLogs.at(-2)).toContain('Uninstalled plugin "alpha"');

404410

});

@@ -437,12 +443,7 @@ describe("plugins cli uninstall", () => {

437443438444

await runPluginsCommand(["plugins", "uninstall", "alpha", "--force"]);

439445440-

expect(planPluginUninstall).toHaveBeenCalledWith(

441-

expect.objectContaining({

442-

pluginId: "alpha",

443-

deleteFiles: true,

444-

}),

445-

);

446+

expectLatestUninstallPlanParams({ pluginId: "alpha", deleteFiles: true });

446447

expect(writeConfigFile).toHaveBeenCalledWith(nextConfig);

447448

expect(refreshPluginRegistry).toHaveBeenCalledWith({

448449

config: nextConfig,

@@ -510,18 +511,14 @@ describe("plugins cli uninstall", () => {

510511511512

await runPluginsCommand(["plugins", "uninstall", "alpha", "--force", "--keep-files"]);

512513513-

expect(planPluginUninstall).toHaveBeenCalledWith(

514-

expect.objectContaining({

515-

pluginId: "alpha",

516-

channelIds: undefined,

517-

deleteFiles: false,

518-

}),

519-

);

514+

expectLatestUninstallPlanParams({

515+

pluginId: "alpha",

516+

channelIds: undefined,

517+

deleteFiles: false,

518+

});

520519

expect(writePersistedInstalledPluginIndexInstallRecords).toHaveBeenCalledWith({});

521520

expect(writeConfigFile).toHaveBeenCalledWith(nextConfig);

522-

expect(runtimeLogs).toEqual(

523-

expect.arrayContaining([expect.stringContaining("channel config (channels.alpha)")]),

524-

);

521+

expectRuntimeLogIncludes("channel config (channels.alpha)");

525522

expect(runtimeLogs.at(-2)).toContain('Uninstalled plugin "alpha"');

526523

});

527524