Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
notmandatory committed Mar 30, 2022
1 parent ac8cb34 commit 7becf6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
# - reserves,compact_filters
# - reserves,rpc
- rpc
- electrum,verify
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
16 changes: 6 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
//!
//! let cli_args = vec!["bdk-cli", "--network", "testnet", "wallet", "--descriptor",
//! "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/*)",
//! "sync", "--max_addresses", "50"];
//! "sync"];
//!
//! let cli_opts = CliOpts::from_iter(&cli_args);
//! let network = cli_opts.network;
Expand Down Expand Up @@ -187,7 +187,7 @@ use bdk_reserves::reserves::ProofOfReserves;
///
/// let cli_args = vec!["bdk-cli", "--network", "testnet", "wallet",
/// "--descriptor", "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/44'/1'/0'/0/*)",
/// "sync", "--max_addresses", "50"];
/// "sync"];
///
/// // to get CliOpts from the OS command line args use:
/// // let cli_opts = CliOpts::from_args();
Expand Down Expand Up @@ -234,9 +234,7 @@ use bdk_reserves::reserves::ProofOfReserves;
/// retries: 5,
/// },
/// },
/// subcommand: WalletSubCommand::OnlineWalletSubCommand(Sync {
/// max_addresses: Some(50)
/// }),
/// subcommand: WalletSubCommand::OnlineWalletSubCommand(Sync),
/// },
/// };
///
Expand Down Expand Up @@ -1694,7 +1692,7 @@ mod test {
fn test_parse_wallet_sync() {
let cli_args = vec!["bdk-cli", "--network", "testnet", "wallet",
"--descriptor", "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)",
"sync", "--max_addresses", "50"];
"sync"];

let cli_opts = CliOpts::from_iter(&cli_args);

Expand Down Expand Up @@ -1739,9 +1737,7 @@ mod test {
skip_blocks: None,
},
},
subcommand: WalletSubCommand::OnlineWalletSubCommand(Sync {
max_addresses: Some(50)
}),
subcommand: WalletSubCommand::OnlineWalletSubCommand(Sync),
},
};

Expand Down Expand Up @@ -1968,7 +1964,7 @@ mod test {
fn test_parse_wrong_network() {
let cli_args = vec!["repl", "--network", "badnet", "wallet",
"--descriptor", "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)",
"sync", "--max_addresses", "50"];
"sync"];

let cli_opts = CliOpts::from_iter_safe(&cli_args);
assert!(cli_opts.is_err());
Expand Down

0 comments on commit 7becf6f

Please sign in to comment.