aboutsummaryrefslogtreecommitdiff
path: root/test/functional/tool_wallet.py
AgeCommit message (Collapse)Author
2020-02-04Merge #16681: Tests: Use self.chain instead of 'regtest' in all current testsMarcoFalke
1abcecc40c518a98b7d17880657ec0247abdf125 Tests: Use self.chain instead of 'regtest' in almost all current tests (Jorge Timón) Pull request description: Simply avoiding the hardcoded string in more places for consistency. It can also allow for more easily reusing tests for other chains other than regtest. Separated from #8994 . Continues #16509 . It is still not complete (ie to be complete, we need the -chain parameter in #16680 and make whether acceptnonstdtxs is allowed for that chain or not customizable for regtest [or for custom chains like in #8994 ] ). But while being incomplete like #16509 , it's quite simple to review and another step forward IMO. ACKs for top commit: Sjors: re-ACK 1abcecc. I think it's an improvement even if incomplete and if some PR's might accidentally bring "regtest" back. Subsequent improvements hopefully don't have to touch 16 files. elichai: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125 ryanofsky: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125. ryanofsky: Code review ACK 1abcecc40c518a98b7d17880657ec0247abdf125 Tree-SHA512: 5620de6dab235ca8bd8670d6366c7b9f04f0e3ca9c5e7f87765b38e16ed80c17d7d1630c0d5fd7c5526f070830d94dc74cc2096d8ede87dc7180ed20569509ee
2019-11-18test: skip tool_wallet test when bitcoin-wallet isn't compiledfanquake
2019-10-26Tests: Use self.chain instead of 'regtest' in almost all current testsJorge Timón
2019-09-16test: Bump timeouts in slow running testsMarcoFalke
2019-07-08test: Tool wallet test coverage for unexpected writes to walletJon Atack
This commit adds test coverage in `test/functional/tool_wallet.py` to reproduce unexpected writes to the wallet as described in https://github.com/bitcoin/bitcoin/issues/15608: - wallet tool `info` unexpectedly writes to the wallet file if the wallet file permissions are read/write. - wallet tool `info` raises with "Error loading . Is wallet being used by another process?" if the wallet file permissions are read-only. 1. Reproduce the reported issue, define the current unexpected behavior, and add test coverage to guide a future fix in the form of commented-out assertions to be uncommented when testing/fixing. 2. Provisionally extend the same coverage to the wallet tool create test and the getwalletinfo test as regression tests while fixing the issue. 3. Add some logging for sanity checking. ------ Changes after rebase: 5. Make wallet_path an instance method instead of a function in tool_wallet.py as per Marco Falke review suggestion. 6. Assert wallet permissions instead of logging them in tool_wallet.py. This ran into an issue with Appveyor keeping permissions at 666 so allowed for 666 as a workaround. 7. Change the added logging from info to debug level. 8. More helpful assertions order in tool_wallet.py#assert_tool_output. This change makes #assert_tool_output raise "Error loading wallet.dat. Is wallet being used by another process?" rather than a less-helpful message when debugging the read-only wallet permissions issue.
2019-07-08test: Split tool_wallet.py test into subtestsJon Atack
as per Marco Falke review suggestion.
2019-07-08test: Add log messages to test/functional/tool_wallet.pyJon Atack
and update code comments as per Python PEP 8 style guide.
2019-01-30[tests] Add wallet-tool testJoão Barbosa
Original tests by João Barbosa <joao.paulo.barbosa@gmail.com> Additional contribution by John Newbery <john@johnnewbery.com>