test: tighten clickclack account assertions · openclaw/openclaw@e149a23
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,10 +25,25 @@ describe("ClickClack account resolution", () => {
|
25 | 25 | accountId: "service", |
26 | 26 | env: { CLICKCLACK_SERVICE_TOKEN: " ccb_live " }, |
27 | 27 | }), |
28 | | -).toMatchObject({ |
| 28 | +).toEqual({ |
| 29 | +allowFrom: ["*"], |
29 | 30 | accountId: "service", |
| 31 | +baseUrl: "https://app.clickclack.chat", |
| 32 | +config: { |
| 33 | +allowFrom: ["*"], |
| 34 | +baseUrl: "https://app.clickclack.chat", |
| 35 | +enabled: true, |
| 36 | +token: { source: "env", provider: "default", id: "CLICKCLACK_SERVICE_TOKEN" }, |
| 37 | +workspace: "wsp_1", |
| 38 | +}, |
30 | 39 | configured: true, |
| 40 | +defaultTo: "channel:general", |
| 41 | +enabled: true, |
| 42 | +reconnectMs: 1_500, |
| 43 | +replyMode: "agent", |
| 44 | +senderIsOwner: false, |
31 | 45 | token: "ccb_live", |
| 46 | +workspace: "wsp_1", |
32 | 47 | }); |
33 | 48 | }); |
34 | 49 | |
@@ -53,13 +68,33 @@ describe("ClickClack account resolution", () => {
|
53 | 68 | }, |
54 | 69 | } satisfies CoreConfig; |
55 | 70 | |
56 | | -expect(resolveClickClackAccount({ cfg, accountId: "peter" })).toMatchObject({ |
| 71 | +expect(resolveClickClackAccount({ cfg, accountId: "peter" })).toEqual({ |
| 72 | +allowFrom: ["*"], |
57 | 73 | accountId: "peter", |
58 | 74 | agentId: "peter-bot", |
59 | | -replyMode: "model", |
| 75 | +baseUrl: "https://app.clickclack.chat", |
| 76 | +config: { |
| 77 | +agentId: "peter-bot", |
| 78 | +allowFrom: ["*"], |
| 79 | +baseUrl: "https://app.clickclack.chat", |
| 80 | +enabled: true, |
| 81 | +model: "openai/gpt-5.4-mini", |
| 82 | +replyMode: "model", |
| 83 | +senderIsOwner: true, |
| 84 | +token: "ccb_peter", |
| 85 | +toolsAllow: ["web_search"], |
| 86 | +workspace: "wsp_1", |
| 87 | +}, |
| 88 | +configured: true, |
| 89 | +defaultTo: "channel:general", |
| 90 | +enabled: true, |
60 | 91 | model: "openai/gpt-5.4-mini", |
| 92 | +reconnectMs: 1_500, |
| 93 | +replyMode: "model", |
61 | 94 | senderIsOwner: true, |
| 95 | +token: "ccb_peter", |
62 | 96 | toolsAllow: ["web_search"], |
| 97 | +workspace: "wsp_1", |
63 | 98 | }); |
64 | 99 | }); |
65 | 100 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。