mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-11 22:53:00 +00:00
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:
parent
5f49cdf9da
commit
6c1dc96af6
1 changed files with 3 additions and 3 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue