test: assert legacy sender warnings · openclaw/openclaw@cffe71e
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -52,8 +52,8 @@ describe("doctor legacy toolsBySender helpers", () => {
|
52 | 52 | } as OpenClawConfig); |
53 | 53 | |
54 | 54 | expect(result.changes).toEqual([ |
55 | | -expect.stringContaining("migrated 1 legacy key to typed id: entries"), |
56 | | -expect.stringContaining("removed 1 legacy key where typed id: entries already existed"), |
| 55 | +"- channels.whatsapp.groups.123@g.us.toolsBySender: migrated 1 legacy key to typed id: entries (owner (kept existing id:owner), alice -> id:alice).", |
| 56 | +"- channels.whatsapp.groups.123@g.us.toolsBySender: removed 1 legacy key where typed id: entries already existed.", |
57 | 57 | ]); |
58 | 58 | expect(result.config.channels?.whatsapp?.groups?.["123@g.us"]?.toolsBySender).toEqual({ |
59 | 59 | "id:owner": { allow: ["fs.read"] }, |
@@ -75,9 +75,9 @@ describe("doctor legacy toolsBySender helpers", () => {
|
75 | 75 | }); |
76 | 76 | |
77 | 77 | expect(warnings).toEqual([ |
78 | | -expect.stringContaining("legacy untyped toolsBySender key"), |
79 | | -expect.stringContaining("explicit prefixes"), |
80 | | -expect.stringContaining('Run "openclaw doctor --fix"'), |
| 78 | +"- Found 1 legacy untyped toolsBySender key (for example channels.whatsapp.groups.123@g.us.toolsBySender.owner).", |
| 79 | +"- Untyped sender keys are deprecated; use explicit prefixes (id:, e164:, username:, name:).", |
| 80 | +'- Run "openclaw doctor --fix" to migrate legacy keys to typed id: entries.', |
81 | 81 | ]); |
82 | 82 | }); |
83 | 83 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。