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

Function test_add_cannot_add_atomic_dir

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

Source from the content-addressed store, hash-verified

1223 #[test]
1224 #[file_serial]
1225 fn test_add_cannot_add_atomic_dir() {
1226 let _guard = DirGuard::new();
1227
1228 let temp_dir = tempfile::tempdir().unwrap();
1229 let repo_path = temp_dir.path();
1230
1231 // Initialize repository
1232 {
1233 let _repo = Repository::init(repo_path).unwrap();
1234 }
1235
1236 std::env::set_current_dir(repo_path).unwrap();
1237
1238 let add = Add::new().with_files(vec![".atomic"]);
1239 let result = add.run();
1240
1241 // Should succeed but skip the .atomic directory (it's ignored)
1242 // The command gracefully skips ignored paths rather than erroring
1243 assert!(result.is_ok());
1244 }
1245
1246 // Edge Case Tests
1247

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