()
| 498 | |
| 499 | #[tokio::test] |
| 500 | async fn test_registry_execute_failing_tool() { |
| 501 | let registry = ToolRegistry::new(PathBuf::from("/tmp")); |
| 502 | registry.register(Arc::new(FailingTool)); |
| 503 | |
| 504 | let result = registry |
| 505 | .execute("failing", &serde_json::json!({})) |
| 506 | .await |
| 507 | .unwrap(); |
| 508 | assert_eq!(result.exit_code, 1); |
| 509 | assert_eq!(result.output, "something went wrong"); |
| 510 | } |
| 511 | |
| 512 | struct LargeOutputTool; |
| 513 |