Tweak logging in worktree randomized test

This commit is contained in:
Max Brunsfeld 2023-03-20 13:10:52 -07:00
parent c730dca3c5
commit 27ad6a57ce

View file

@ -3697,13 +3697,13 @@ mod tests {
if rng.gen() { if rng.gen() {
log::info!( log::info!(
"Creating dir {:?}", "creating dir {:?}",
new_path.strip_prefix(root_path).unwrap() new_path.strip_prefix(root_path).unwrap()
); );
fs.create_dir(&new_path).await.unwrap(); fs.create_dir(&new_path).await.unwrap();
} else { } else {
log::info!( log::info!(
"Creating file {:?}", "creating file {:?}",
new_path.strip_prefix(root_path).unwrap() new_path.strip_prefix(root_path).unwrap()
); );
fs.create_file(&new_path, Default::default()).await.unwrap(); fs.create_file(&new_path, Default::default()).await.unwrap();
@ -3745,7 +3745,7 @@ mod tests {
.unwrap(); .unwrap();
} }
log::info!( log::info!(
"Creating {:?} with contents:\n{}", "creating gitignore {:?} with contents:\n{}",
ignore_path.strip_prefix(&root_path).unwrap(), ignore_path.strip_prefix(&root_path).unwrap(),
ignore_contents ignore_contents
); );
@ -3789,7 +3789,7 @@ mod tests {
}; };
log::info!( log::info!(
"Renaming {:?} to {}{:?}", "renaming {:?} to {}{:?}",
old_path.strip_prefix(&root_path).unwrap(), old_path.strip_prefix(&root_path).unwrap(),
if overwrite_existing_dir { if overwrite_existing_dir {
"overwrite " "overwrite "
@ -3810,13 +3810,13 @@ mod tests {
.unwrap(); .unwrap();
} else if fs.is_file(&old_path).await { } else if fs.is_file(&old_path).await {
log::info!( log::info!(
"Deleting file {:?}", "deleting file {:?}",
old_path.strip_prefix(&root_path).unwrap() old_path.strip_prefix(&root_path).unwrap()
); );
fs.remove_file(old_path, Default::default()).await.unwrap(); fs.remove_file(old_path, Default::default()).await.unwrap();
} else { } else {
log::info!( log::info!(
"Deleting dir {:?}", "deleting dir {:?}",
old_path.strip_prefix(&root_path).unwrap() old_path.strip_prefix(&root_path).unwrap()
); );
fs.remove_dir( fs.remove_dir(