MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_git_not_installed

Function test_git_not_installed

core/src/tools/builtin/git.rs:554–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552
553 #[tokio::test]
554 async fn test_git_not_installed() {
555 // This test checks that the local provider handles non-git repos properly.
556 let tool = GitTool;
557 let dir = tempfile::tempdir().unwrap();
558 let ctx = ToolContext::new(dir.path().to_path_buf());
559 let args = serde_json::json!({"command": "status"});
560 let out = tool.execute(&args, &ctx).await.unwrap();
561 assert!(!out.success);
562 assert!(out.content.contains("Not a git repository"));
563 }
564
565 #[tokio::test]
566 async fn test_missing_command() {

Callers

nothing calls this directly

Calls 2

pathMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected