use {super::*, ord::subcommand::index::info::TransactionsOutput}; #[test] fn json_with_satoshi_index() { let rpc_server = test_bitcoincore_rpc::spawn(); CommandBuilder::new("--index-sats index info") .rpc_server(&rpc_server) .stdout_regex( r#"\{ "blocks_indexed": 1, "branch_pages": \d+, "fragmented_bytes": \d+, "index_file_size": \d+, "index_path": ".*\.redb", "leaf_pages": \d+, "metadata_bytes": \d+, "outputs_traversed": 1, "page_size": \d+, "sat_ranges": 1, "stored_bytes": \d+, "tables": .*, "transactions": \[ \{ "starting_block_count": 0, "starting_timestamp": \d+ \} \], "tree_height": \d+, "utxos_indexed": 2 \} "#, ) .run_and_extract_stdout(); } #[test] fn json_without_satoshi_index() { let rpc_server = test_bitcoincore_rpc::spawn(); CommandBuilder::new("index info") .rpc_server(&rpc_server) .stdout_regex( r#"\{ "blocks_indexed": 1, "branch_pages": \d+, "fragmented_bytes": \d+, "index_file_size": \d+,