Stop Debug-formatting credentials in fabro-auth resolve tests

Three test panics printed the resolved `Credentials` value with `{:?}`.
The lithos credential types redact secrets in their Debug output, but
CodeQL's cleartext-logging rule cannot see that and flagged each site.
The variant name is enough to diagnose a failing test, so drop the value.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-09-09 19:09:22 -06:00
parent 5f49cdf9da
commit 6c1dc96af6
No known key found for this signature in database

View file

@ -559,7 +559,7 @@ mod tests {
auth: HttpAuthentication::Bearer(secret),
..
}) => secret.expose_secret(),
other => panic!("expected bearer credentials, got {other:?}"),
_ => panic!("expected bearer credentials"),
}
}
@ -622,7 +622,7 @@ mod tests {
assert_eq!(header.name, "x-api-key");
assert_eq!(header.value.expose_secret(), "anthropic-key");
}
other => panic!("expected header credentials, got {other:?}"),
_ => panic!("expected header credentials"),
}
}
@ -724,7 +724,7 @@ mod tests {
let credentials = resolver.resolve(modal).await.unwrap();
match &credentials {
Credentials::Http(http) => assert!(matches!(http.auth, HttpAuthentication::None)),
other => panic!("expected header-only credentials, got {other:?}"),
_ => panic!("expected header-only credentials"),
}
assert_eq!(header_value(&credentials, "Modal-Key"), Some("wk-test"));
assert_eq!(header_value(&credentials, "Modal-Secret"), Some("ws-test"));