mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-01 02:04:24 +00:00
Keep the Daytona key rendering out of the test's assertion messages
CodeQL read the assertion messages as a log of the credentials' Debug output. The test proves that output never holds the key, so the messages added nothing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
53b9f91bc1
commit
399aef8111
1 changed files with 4 additions and 2 deletions
|
|
@ -1041,9 +1041,11 @@ mod tests {
|
|||
let credentials = DaytonaCredentials::from_api_key("dtn_secret_key".to_string(), |name| {
|
||||
(name == EnvVars::DAYTONA_ORGANIZATION_ID).then(|| "org-1".to_string())
|
||||
});
|
||||
// The rendering stays out of the assertion messages: a failure must
|
||||
// not print the key it is checking for.
|
||||
let rendered = format!("{credentials:?}");
|
||||
assert!(!rendered.contains("dtn_secret_key"), "{rendered}");
|
||||
assert!(rendered.contains("org-1"), "{rendered}");
|
||||
assert!(!rendered.contains("dtn_secret_key"));
|
||||
assert!(rendered.contains("org-1"));
|
||||
assert_eq!(
|
||||
credentials.config().api_key.as_deref(),
|
||||
Some("dtn_secret_key")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue