mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
test(memory): avoid PII-like tool rule names (#2680)
This commit is contained in:
@@ -175,6 +175,8 @@ pub async fn tool_rules_json(params: ToolRuleListParams) -> Result<RpcOutcome<Va
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
use super::*;
|
||||
use crate::openhuman::memory_tools::ToolMemoryPriority;
|
||||
|
||||
@@ -183,8 +185,9 @@ mod tests {
|
||||
}
|
||||
|
||||
fn unique_tool_name() -> String {
|
||||
let short = &uuid::Uuid::new_v4().as_simple().to_string()[..12];
|
||||
format!("toolmem{short}")
|
||||
static NEXT_TOOL_ID: AtomicUsize = AtomicUsize::new(1);
|
||||
let id = NEXT_TOOL_ID.fetch_add(1, Ordering::Relaxed);
|
||||
format!("toolmem_test_{id}")
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user