Skip to content

Commit

Permalink
test: update socket test to new behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Apr 15, 2024
1 parent c152498 commit 814873b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ pub fn copy_file(
Err(e)
}
}
Ok(_) => Ok(true)
Ok(_) => Ok(true),
}
}

Expand Down
6 changes: 2 additions & 4 deletions tests/unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ fn test_filetypes(
assert!(ftype.unwrap().is_symlink());
}
"socket" => {
assert!(dest_path.exists());
assert!(ftype.unwrap().is_file());
let contents = fs::read_to_string(&dest_path).unwrap();
assert!(contents.contains("marker for a file that was permanently deleted."));
// Socket files are not copied, so are instead simply deleted
assert!(!dest_path.exists());
}
_ => {}
}
Expand Down

0 comments on commit 814873b

Please sign in to comment.