Skip to content

Commit

Permalink
test(fs-index): some debugging for windows ci
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <[email protected]>
  • Loading branch information
tareknaser committed Aug 6, 2024
1 parent 8ece25e commit 0e3cac8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions fs-index/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,34 @@ fn test_build_index_with_directory() {
.expect("Failed to create temp dir");
let root_path = temp_dir.path();

// print path
println!("Root path: {:?}", root_path);
// assert it exists
assert!(root_path.exists(), "Root path does not exist");

let dir_path = root_path.join("dir");
fs::create_dir(&dir_path).expect("Failed to create dir");

// print dir path
println!("Dir path: {:?}", dir_path);
// assert it exists
assert!(dir_path.exists(), "Dir path does not exist");

let file_path = dir_path.join("file.txt");
fs::write(&file_path, "file content").expect("Failed to write to file");

// print file path
println!("File path: {:?}", file_path);
// assert it exists
assert!(file_path.exists(), "File path does not exist");

let expected_resource: IndexedResource<Id> =
get_indexed_resource_from_file(&file_path, &root_path.to_path_buf())
.expect("Failed to get indexed resource");

// print expected resource
println!("Expected resource: {:?}", expected_resource);

let index = ResourceIndex::build(root_path).expect("Failed to build index");
assert_eq!(index.len(), 1, "{:?}", index);

Expand Down

0 comments on commit 0e3cac8

Please sign in to comment.