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:
@@ -118,7 +118,7 @@ func TestClient_Ping_403WrapsInvalidCredentials(t *testing.T) {
|
||||
func TestClient_TokenNeverLoggedInFull(t *testing.T) {
|
||||
t.Setenv("LOG_FORMAT", "")
|
||||
logger.ConfigureFromEnv()
|
||||
defer logger.ConfigureFromEnv()
|
||||
t.Cleanup(func() { logger.ConfigureFromEnv() })
|
||||
|
||||
// Redirect the project's internal logger to an in-memory buffer so we can
|
||||
// assert the raw token never appears in log output. Using stdlib `log`
|
||||
|
||||
Reference in New Issue
Block a user