From e3c0b18138069c95a49c5b2d86027ca356ed1616 Mon Sep 17 00:00:00 2001 From: Stanimal Date: Thu, 2 Dec 2021 14:33:12 +0400 Subject: [PATCH] update test --- .../core/src/chain_storage/tests/blockchain_database.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base_layer/core/src/chain_storage/tests/blockchain_database.rs b/base_layer/core/src/chain_storage/tests/blockchain_database.rs index fe34900d25..85f9729078 100644 --- a/base_layer/core/src/chain_storage/tests/blockchain_database.rs +++ b/base_layer/core/src/chain_storage/tests/blockchain_database.rs @@ -437,11 +437,15 @@ mod fetch_total_size_stats { use super::*; #[test] - fn it_works_when_db_is_empty() { + fn it_measures_the_number_of_entries() { let db = setup(); + let _ = add_many_chained_blocks(2, &db); let stats = db.fetch_total_size_stats().unwrap(); // Returns one per db - assert_eq!(stats.sizes().len(), 20); + assert_eq!( + stats.sizes().iter().find(|s| s.name == "utxo_db").unwrap().num_entries, + 2 + ); } }