Files
optimclaw/src/import/openclaw/credentials.rs
T
26068db24b feat: Import OpenClaw memory, history and settings (#903)
* feat: Import OpenClaw memory, history and settings

* review fixes

* fix: address remaining code quality issues

1. Remove dead import_conversation() function - replaced by import_conversation_atomic()
2. Improve non-UTF-8 filename handling in list_agent_dbs() - log warning instead of silent 'unknown'
3. Remove emojis from CLI output per project style guide

Co-Authored-By: Claude Haiku 4.5 <[email protected]>

---------

Co-authored-by: Claude Haiku 4.5 <[email protected]>
2026-03-10 18:37:10 -07:00

27 lines
885 B
Rust

//! OpenClaw credential import with secure handling.
//!
//! Credential extraction and import is handled in the main importer (mod.rs).
//! The credentials module focuses on security validation and testing.
#[cfg(test)]
mod tests {
use crate::secrets::CreateSecretParams;
use secrecy::SecretString;
#[test]
fn test_secret_string_not_logged() {
let secret = SecretString::new("super-secret-key".to_string().into_boxed_str());
let debug_output = format!("{:?}", secret);
// Verify that the actual secret is not in the debug output
assert!(!debug_output.contains("super-secret-key"));
}
#[test]
fn test_create_secret_params_normalized() {
let params = CreateSecretParams::new("MY_API_KEY", "value123");
// Secret names should be normalized to lowercase
assert_eq!(params.name, "my_api_key");
}
}