From 59191e4bcbb4a8e291f58047d2505feaf929d3cb Mon Sep 17 00:00:00 2001 From: Max Isom Date: Fri, 25 Oct 2024 16:37:05 -0700 Subject: [PATCH] Fix test --- rust/blockstore/src/blockfile_writer_test.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/rust/blockstore/src/blockfile_writer_test.rs b/rust/blockstore/src/blockfile_writer_test.rs index e9cea4f7306..6a507948f4a 100644 --- a/rust/blockstore/src/blockfile_writer_test.rs +++ b/rust/blockstore/src/blockfile_writer_test.rs @@ -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 } } }