MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_registry_execute_failing_tool

Function test_registry_execute_failing_tool

core/src/tools/registry.rs:500–510  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

registerMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected