radicle: Disable canonicalize_home tests on macos

We were doing a workaround stripping prefixes, but I think it makes more
sense to skip the test all together.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
Sebastian Martinez 2023-07-25 16:45:50 +02:00 committed by Alexis Sellier
parent 1241bbb4e8
commit 7368e38942
No known key found for this signature in database
1 changed files with 2 additions and 6 deletions

View File

@ -364,9 +364,9 @@ impl Home {
}
#[cfg(test)]
#[cfg(not(target_os = "macos"))]
mod test {
use std::fs;
use std::path::Path;
use super::Home;
@ -382,7 +382,7 @@ mod test {
fs::create_dir_all(path.clone()).unwrap();
let last = tmp.path().components().last().unwrap();
let mut home = Home::new(
let home = Home::new(
tmp.path()
.join("..")
.join(last)
@ -390,10 +390,6 @@ mod test {
.join("Radicle"),
)
.unwrap();
if cfg!(target_os = "macos") {
home.path =
Path::new("/").join(home.path.strip_prefix("/private").unwrap_or(&home.path))
};
assert_eq!(home.path, path);
}