MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_add_run_file_not_found

Function test_add_run_file_not_found

atomic-cli/src/commands/add.rs:932–950  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

930 #[test]
931 #[file_serial]
932 fn test_add_run_file_not_found() {
933 let _guard = DirGuard::new();
934
935 let temp_dir = tempfile::tempdir().unwrap();
936 let repo_path = temp_dir.path();
937
938 // Initialize repository and drop to release lock
939 {
940 let _repo = Repository::init(repo_path).unwrap();
941 }
942
943 std::env::set_current_dir(repo_path).unwrap();
944
945 let add = Add::new().with_files(vec!["nonexistent.txt"]);
946 let result = add.run();
947
948 // Should fail because file doesn't exist
949 assert!(result.is_err());
950 }
951
952 #[test]
953 #[file_serial]

Callers

nothing calls this directly

Calls 5

initFunction · 0.50
unwrapMethod · 0.45
pathMethod · 0.45
with_filesMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected