test: spell out doctor repair output · openclaw/openclaw@0977067
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -112,7 +112,7 @@ describe("doctor plugin manifest legacy contract repair", () => {
|
112 | 112 | |
113 | 113 | expect(migrations).toHaveLength(1); |
114 | 114 | expect(migrations[0]?.changeLines).toEqual([ |
115 | | -expect.stringContaining("moved speechProviders to contracts.speechProviders"), |
| 115 | +`- ${path.join(root, "openclaw.plugin.json")}: moved speechProviders to contracts.speechProviders`, |
116 | 116 | ]); |
117 | 117 | }); |
118 | 118 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -151,7 +151,14 @@ describe("maybeRepairSandboxRegistryFiles", () => {
|
151 | 151 | await maybeRepairSandboxRegistryFiles(mockPrompter); |
152 | 152 | |
153 | 153 | expect(migrateLegacySandboxRegistryFiles).not.toHaveBeenCalled(); |
154 | | -expect(note).toHaveBeenCalledWith(expect.stringContaining("openclaw doctor --fix"), "Sandbox"); |
| 154 | +expect(note).toHaveBeenCalledWith( |
| 155 | +[ |
| 156 | +"Legacy sandbox registry files detected.", |
| 157 | +"- containers: /tmp/openclaw/sandbox/containers.json (2 entries)", |
| 158 | +"Run openclaw doctor --fix to migrate them to sharded registry files.", |
| 159 | +].join("\n"), |
| 160 | +"Sandbox", |
| 161 | +); |
155 | 162 | }); |
156 | 163 | |
157 | 164 | it("migrates legacy registry files during doctor --fix", async () => { |
@@ -182,7 +189,7 @@ describe("maybeRepairSandboxRegistryFiles", () => {
|
182 | 189 | |
183 | 190 | expect(migrateLegacySandboxRegistryFiles).toHaveBeenCalledTimes(1); |
184 | 191 | expect(note).toHaveBeenCalledWith( |
185 | | -expect.stringContaining("Migrated containers"), |
| 192 | +"- Migrated containers registry from /tmp/openclaw/sandbox/containers.json into 2 shards.", |
186 | 193 | "Doctor changes", |
187 | 194 | ); |
188 | 195 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -182,8 +182,8 @@ describe("bundled plugin load path repair", () => {
|
182 | 182 | }); |
183 | 183 | |
184 | 184 | expect(warnings).toEqual([ |
185 | | -expect.stringContaining(`plugins.load.paths: bundled plugin path "${legacyPath}"`), |
186 | | -expect.stringContaining('Run "openclaw doctor --fix"'), |
| 185 | +`- plugins.load.paths: bundled plugin path "${legacyPath}" still aliases feishu; OpenClaw loads the packaged bundled plugin from "${bundledPath}".`, |
| 186 | +'- Run "openclaw doctor --fix" to remove these redundant bundled plugin paths.', |
187 | 187 | ]); |
188 | 188 | }); |
189 | 189 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -65,7 +65,7 @@ describe("doctor config flow steps", () => {
|
65 | 65 | warnings: [], |
66 | 66 | } satisfies DoctorConfigPreflightResult["snapshot"]); |
67 | 67 | |
68 | | -expect(result.issueLines).toEqual([expect.stringContaining("- heartbeat:")]); |
| 68 | +expect(result.issueLines).toEqual(["- heartbeat: use agents.defaults.heartbeat"]); |
69 | 69 | expect(result.changeLines).not.toStrictEqual([]); |
70 | 70 | expect(result.state.fixHints).toContain( |
71 | 71 | 'Run "openclaw doctor --fix" to migrate legacy config keys.', |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。