Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Oct 29, 2024
1 parent 516e9bf commit 59191e4
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions rust/blockstore/src/blockfile_writer_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,12 @@ mod tests {
assert_eq!(block_on(reader.count()).unwrap(), ref_last_commit.len());

// Check that entries are ordered and match expected
if let Some(min_key) = ref_last_commit.keys().next() {
let all_entries =
block_on(reader.get_gte(min_key.0.as_str(), min_key.1.as_str())).unwrap();

for (blockfile_entry, expected_entry) in
all_entries.iter().zip(ref_last_commit.iter())
{
assert_eq!(blockfile_entry.0, expected_entry.0 .1); // key matches
assert_eq!(blockfile_entry.1, expected_entry.1); // value matches
}
let all_entries = block_on(reader.get_range(.., ..)).unwrap();

for (blockfile_entry, expected_entry) in all_entries.iter().zip(ref_last_commit.iter())
{
assert_eq!(blockfile_entry.0, expected_entry.0 .1); // key matches
assert_eq!(blockfile_entry.1, expected_entry.1); // value matches
}
}
}
Expand Down

0 comments on commit 59191e4

Please sign in to comment.