mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
test: tighten msteams credential assertions
This commit is contained in:
@@ -208,11 +208,15 @@ describe("token – federated credentials (managed identity)", () => {
|
||||
useManagedIdentity: false,
|
||||
} as any;
|
||||
const result = resolveMSTeamsCredentials(cfg);
|
||||
expect(result).toMatchObject({
|
||||
expect(result).toEqual({
|
||||
type: "federated",
|
||||
appId: "app-id",
|
||||
tenantId: "tenant-id",
|
||||
certificatePath: "/cert.pem",
|
||||
certificateThumbprint: undefined,
|
||||
useManagedIdentity: undefined,
|
||||
managedIdentityClientId: undefined,
|
||||
});
|
||||
expect(result).not.toHaveProperty("useManagedIdentity", true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -223,7 +227,12 @@ describe("token – backward compatibility", () => {
|
||||
it("defaults to secret when authType is absent", () => {
|
||||
const cfg = { appId: "app-id", appPassword: "pw", tenantId: "tenant-id" } as any;
|
||||
const result = resolveMSTeamsCredentials(cfg);
|
||||
expect(result).toMatchObject({ type: "secret" });
|
||||
expect(result).toEqual({
|
||||
type: "secret",
|
||||
appId: "app-id",
|
||||
appPassword: "pw",
|
||||
tenantId: "tenant-id",
|
||||
});
|
||||
});
|
||||
|
||||
it("explicit authType=secret behaves same as absent", () => {
|
||||
|
||||
Reference in New Issue
Block a user