Skip to content

Commit 62e01e5

Browse files
committed
Improve getindexinfo test
The current test passes if the returned map is empty. Update the test to access the values and ensure the deserialization worked.
1 parent 68700ef commit 62e01e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

integration_test/tests/util.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ fn util__get_descriptor_info() {
6666
#[cfg(not(feature = "v20_and_below"))]
6767
#[test]
6868
fn util__get_index_info() {
69-
let node = Node::with_wallet(Wallet::Default, &[]);
70-
let _: GetIndexInfo = node.client.get_index_info().expect("getindexinfo");
69+
let node = Node::with_wallet(Wallet::Default, &["-txindex"]);
70+
let index_info: GetIndexInfo = node.client.get_index_info().expect("getindexinfo");
71+
72+
let txindex_info = index_info.0.get("txindex").unwrap();
73+
assert!(txindex_info.best_block_height < u32::MAX, "best_block_height should be a valid block height");
7174
}
7275

7376
#[test]

0 commit comments

Comments
 (0)