more session tests to ensure wd structure

This commit is contained in:
Nikita Galaiko 2023-03-15 10:56:17 +01:00
parent a6ae15ce44
commit 7730653aca
No known key found for this signature in database
GPG Key ID: EBAB54E845BA519D

View File

@ -369,6 +369,9 @@ fn test_flush_ensure_wd_structure() {
.peel_to_tree()
.unwrap()
.walk(git2::TreeWalkMode::PreOrder, |root, entry| {
if !root.starts_with("wd") && entry.name() != Some("wd") {
return git2::TreeWalkResult::Ok;
}
let full_path = Path::new(root).join(entry.name().unwrap());
all_files_1.insert(full_path.to_str().unwrap().to_string(), true);
git2::TreeWalkResult::Ok
@ -388,6 +391,10 @@ fn test_flush_ensure_wd_structure() {
.peel_to_tree()
.unwrap()
.walk(git2::TreeWalkMode::PreOrder, |root, entry| {
if !root.starts_with("wd") && entry.name() != Some("wd") {
return git2::TreeWalkResult::Ok;
}
let full_path = Path::new(root).join(entry.name().unwrap());
all_files_2.insert(full_path.to_str().unwrap().to_string(), true);
git2::TreeWalkResult::Ok