test: tighten msteams credential assertions · openclaw/openclaw@42e1d68
shakkernerd
·
2026-05-11
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -208,11 +208,15 @@ describe("token – federated credentials (managed identity)", () => {
|
208 | 208 | useManagedIdentity: false, |
209 | 209 | } as any; |
210 | 210 | const result = resolveMSTeamsCredentials(cfg); |
211 | | -expect(result).toMatchObject({ |
| 211 | +expect(result).toEqual({ |
212 | 212 | type: "federated", |
| 213 | +appId: "app-id", |
| 214 | +tenantId: "tenant-id", |
213 | 215 | certificatePath: "/cert.pem", |
| 216 | +certificateThumbprint: undefined, |
| 217 | +useManagedIdentity: undefined, |
| 218 | +managedIdentityClientId: undefined, |
214 | 219 | }); |
215 | | -expect(result).not.toHaveProperty("useManagedIdentity", true); |
216 | 220 | }); |
217 | 221 | }); |
218 | 222 | |
@@ -223,7 +227,12 @@ describe("token – backward compatibility", () => {
|
223 | 227 | it("defaults to secret when authType is absent", () => { |
224 | 228 | const cfg = { appId: "app-id", appPassword: "pw", tenantId: "tenant-id" } as any; |
225 | 229 | const result = resolveMSTeamsCredentials(cfg); |
226 | | -expect(result).toMatchObject({ type: "secret" }); |
| 230 | +expect(result).toEqual({ |
| 231 | +type: "secret", |
| 232 | +appId: "app-id", |
| 233 | +appPassword: "pw", |
| 234 | +tenantId: "tenant-id", |
| 235 | +}); |
227 | 236 | }); |
228 | 237 | |
229 | 238 | it("explicit authType=secret behaves same as absent", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。