Skip to content

Conversation

jonatack
Copy link
Member

@jonatack jonatack commented Apr 21, 2020

The bitcoin-cli -rpcwallet= option is an essential RPC/CLI option when more than one wallet is loaded (see bitcoin-cli -help | grep -A5 rpcwallet or src/bitcoin-cli.cpp::L61) and it currently has no test coverage.

It is not only used by users, but also by the test framework and ~10 test files via get_wallet_rpc().

This PR adds coverage, while simultaneously improving the -getinfo coverage when multiple wallets are loaded. This is similar to the test coverage that would be added in #18594.

@DrahtBot DrahtBot added the Tests label Apr 21, 2020
@DrahtBot
Copy link
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@robot-visions
Copy link
Contributor

ACK 5835c4a

Passes for me locally.

I remember doing a lot of this manually for your PR Review Club session a few weeks ago. Thanks for adding all this as a test!

@jonatack
Copy link
Member Author

Thanks @robot-visions for reviewing. I replaced the timeout magic value of 60 with self.rpc_timeout. IDK if there is a better value to use.

and add -getinfo coverage with multiple wallets loaded.
@robot-visions
Copy link
Contributor

ACK 2495110

Tests still pass. Thanks for updating!

@maflcko
Copy link
Member

maflcko commented Apr 24, 2020

Thanks for writing tests

@maflcko maflcko merged commit 5f19155 into bitcoin:master Apr 24, 2020
@jonatack jonatack deleted the rpcwallet-tests branch April 24, 2020 22:46
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 25, 2020
2495110 test: add coverage for -rpcwallet cli option (Jon Atack)

Pull request description:

  The bitcoin-cli `-rpcwallet=` option is an essential RPC/CLI option when more than one wallet is loaded (see `bitcoin-cli -help | grep -A5 rpcwallet` or `src/bitcoin-cli.cpp::L61`) and it currently has no test coverage.

  It is not only used by users, but also by the test framework and ~10 test files via `get_wallet_rpc()`.

  This PR adds coverage, while simultaneously improving the `-getinfo` coverage when multiple wallets are loaded. This is similar to the test coverage that would be added in bitcoin#18594.

ACKs for top commit:
  robot-visions:
    ACK 2495110

Tree-SHA512: caaa8b99fb8fa481ab2c6b2a287ed29720bb4553c3f66657462c44fa2990acaaf36cabeaaf81408678e5fdce4e105d729dd94b5ed8588dd1a6f2cb03fc25acf3
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 9, 2020
and add -getinfo coverage with multiple wallets loaded.

Github-Pull: bitcoin#18724
Rebased-From: 2495110
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 13, 2020
and add -getinfo coverage with multiple wallets loaded.

Github-Pull: bitcoin#18724
Rebased-From: 2495110
luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jun 14, 2020
and add -getinfo coverage with multiple wallets loaded.

Github-Pull: bitcoin#18724
Rebased-From: 2495110
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 20, 2021
Summary:
and add -getinfo coverage with multiple wallets loaded.

> The bitcoin-cli -rpcwallet= option is an essential RPC/CLI option when more than one wallet is loaded (see bitcoin-cli -help | grep -A5 rpcwallet or src/bitcoin-cli.cpp::L61) and it currently has no test coverage.
>
> It is not only used by users, but also by the test framework and ~10 test files via get_wallet_rpc().
>
> This PR adds coverage, while simultaneously improving the -getinfo coverage when multiple wallets are loaded.

This is a backport of Core [[bitcoin/bitcoin#18724 | PR18724]]

Test Plan: `./test/functional/test_runner.py interface_bit*`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8975
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants