test(adapters): order-independent assert in MCP search filter test

This commit is contained in:
2026-08-29 13:49:28 +00:00
parent c93f7387ff
commit 0e67c7c00f
+2 -1
View File
@@ -870,13 +870,14 @@ mod tests {
let result = invoke_tool(&gateway, "search", Some(args), None).await;
assert_eq!(result.is_error, Some(false));
let structured = result.structured_content.expect("structured present");
let names: Vec<String> = structured
let mut names: Vec<String> = structured
.get("operations")
.and_then(Value::as_array)
.expect("operations array")
.iter()
.filter_map(|o| o.get("name").and_then(Value::as_str).map(str::to_string))
.collect();
names.sort();
assert_eq!(
names,
vec!["fs/readFile".to_string(), "fs/writeFile".to_string()],