Skip to content

Commit

Permalink
chore: rename test function and spell correction
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandSherwin authored and joshuef committed Nov 7, 2023
1 parent 65c3e7f commit 72b3f1e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions sn_cli/src/subcommands/files/chunk_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ mod tests {
use rand::{thread_rng, Rng};
use rayon::prelude::IntoParallelIterator;
use sn_logging::LogBuilder;
use sn_protocol::test_utils::assert_lists;
use sn_protocol::test_utils::assert_list_eq;
use tempfile::TempDir;

#[test]
Expand Down Expand Up @@ -1242,7 +1242,7 @@ mod tests {
}

assert!(new_chunks_from_dir.contains(&removed_chunk));
assert_lists(old_chunks_from_dir, new_chunks_from_dir);
assert_list_eq(old_chunks_from_dir, new_chunks_from_dir);
assert!(metadata_path.exists());

Ok(())
Expand Down Expand Up @@ -1325,7 +1325,7 @@ mod tests {
new_unpaid_chunks.insert(chunk_xorname_from_filename);
}
}
assert_lists(new_unpaid_chunks, old_unpaid_chunks);
assert_list_eq(new_unpaid_chunks, old_unpaid_chunks);

// now marking the chunk as verified should complete the entire file
// this is intended. Lack of metadata file would make us believe that all the chunks were paid.
Expand Down
2 changes: 1 addition & 1 deletion sn_cli/src/subcommands/files/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async fn upload_files(
let mut chunk_manager = ChunkManager::new(root_dir);
chunk_manager.chunk_path(&files_path)?;

// Return early if we hav no files to pay/verify
// Return early if we have no files to pay/verify
if chunk_manager.is_unpaid_chunks_empty() && chunk_manager.is_paid_chunks_empty() {
println!("All files were already uploaded and verified");
println!("**************************************");
Expand Down
2 changes: 1 addition & 1 deletion sn_protocol/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// permissions and limitations relating to use of the SAFE Network Software.

/// Assert any collection/iterator even if their orders do not match.
pub fn assert_lists<I, J, K>(a: I, b: J)
pub fn assert_list_eq<I, J, K>(a: I, b: J)
where
K: Eq + Clone,
I: IntoIterator<Item = K>,
Expand Down

0 comments on commit 72b3f1e

Please sign in to comment.