test: address PR review follow-ups for OAuth and logger cleanup
Restore logger config via t.Cleanup after t.Setenv so Yuque token tests do not leak global state, add unit tests for MCP OAuth non-interactive context helpers and IM auth notice formatting, and fix EmbedChatCore indentation.
This commit is contained in:
@@ -44,4 +44,8 @@ func TestWithIMIdentity(t *testing.T) {
|
||||
if principal.Type != types.PrincipalIMUser || principal.ID != "42:channel-1:feishu:open-id-1" {
|
||||
t.Fatalf("Principal = %#v, want im_user for the external IM user", principal)
|
||||
}
|
||||
|
||||
if !types.IsMCPOAuthNonInteractive(ctx) {
|
||||
t.Fatal("IM context should mark MCP OAuth as non-interactive")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user