Skip to content

Commit

Permalink
draft debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bochaco committed Mar 13, 2024
1 parent 4d6a182 commit e4e84a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sn_cli/src/subcommands/acc_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ mod tests {
let wallet_dir = tmp_dir.path();
let _ = get_funded_wallet(&client, wallet_dir).await?;

let files_path = tmp_dir.path().join("myaccpacket");
let files_path = tmp_dir.path().join("myaccpacket-to-scan");
let mut test_files = create_test_files_on_disk(&files_path)?;

let mut acc_packet = AccountPacket::init(
Expand All @@ -990,10 +990,13 @@ mod tests {
Some(root_folder_addr),
)?;

acc_packet.status()?;

let changes = acc_packet.scan_files_and_folders_for_changes(false)?;
// verify changes detected
assert_eq!(changes.mutations.len(), 4);
assert!(changes.mutations.iter().all(|mutation| {
println!("===========>>>>> MUTATION: {mutation:?}");
matches!(mutation, Mutation::NewFile(i) if i.file_path == files_path.join("file0.txt"))
|| matches!(mutation, Mutation::NewFile(i) if i.file_path == files_path.join("dir1").join("file1.txt"))
|| matches!(mutation, Mutation::NewFolder(i) if i.file_path == files_path.join("dir1"))
Expand Down

0 comments on commit e4e84a5

Please sign in to comment.