aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-10-08Merge #14324: qa: Run more tests with wallet disabledMarcoFalke
faa4043c66 qa: Run more tests with wallet disabled (MarcoFalke) Pull request description: Instead of skipping the whole test, only skip the wallet specific section of a test if the wallet is not compiled in. This is mostly an indentation change, so can be reviewed with `--ignore-all-space`. Tree-SHA512: 5941a8b6b00dca5cf9438c5f6f010ba812115188a69e427d7ade4c1ab8cfe7a57c73daf52c66235dbb24b1cd9ab7c7a17c49bc23d931e041b605d79116a71f66
2018-10-08Merge #14413: tests: Allow closed rpc handler in assert_start_raises_init_errorMarcoFalke
62c304ea48 tests: Allow closed http server in assert_start_raises_init_error (Chun Kuan Lee) Pull request description: The rpc handler may be unregistered when http server haven't been closed yet. So it may be allowable to get -342 `non-JSON HTTP response with \'%i %s\' from server` (503 Service Unavailable) See https://ci.appveyor.com/project/DrahtBot/bitcoin/build/master.2001. It shows "Rejecting request while shutting down" between "RPC stopped" and "Stopped HTTP server" Tree-SHA512: e1f50ab9096cf23494ccc2850c01516c4a75f112c99108759157b22fce2011682a4b88216f206702f6a56e960182c00098053ad75f13aa0eafe27046adae63da
2018-10-08tests: Allow closed http server in assert_start_raises_init_errorChun Kuan Lee
2018-10-07Merge #14419: [tests] Remove rpc_zmq.pyMarcoFalke
42a995ae48 [tests] Remove rpc_zmq.py (John Newbery) Pull request description: rpc_zmq.py is racy and fails intermittently. Remove that test file and move the getzmqnotifications RPC test into interface_zmq.py. Tree-SHA512: 666c8f252f8a392deda1bd531e84fdc04bdae4eab09407657ade2b5fc0aeffa247735e20314236f56e4e3402476673f3b7538d6e09f5af6976021ba2377ce63c
2018-10-07Merge #13883: utils: Convert Windows args to utf-8 stringMarcoFalke
380c843217 utils: Convert Windows args to utf-8 string (Chun Kuan Lee) Pull request description: Create a new class `WinCmdLineArgs` when building for Windows. It converts all command line arguments to utf8 string. Tree-SHA512: f098520fd123a8a452bc84a55dc8c0b88f0c475410efe57f2ccc393f86c396eed59ea1575ddc1b920323792e390fdb092061d80cdcd9b682f0ac79a22a22ff82
2018-10-07[tests] Remove rpc_zmq.pyJohn Newbery
rpc_zmq.py is racy and fails intermittently. Remove that test file and move the getzmqnotifications RPC test into interface_zmq.py
2018-10-03test: Add missing call to skip_if_no_cli()practicalswift
2018-10-03check that a separator is found for psbt inputs, outputs, and global mapAndrew Chow
2018-09-30utils: Convert Windows args to utf-8 stringChun Kuan Lee
2018-09-27Merge #14316: tests: exclude all tests with difference parameters in ↵MarcoFalke
`--exclude` list c7b3e487f2 tests: exclude all tests with difference parameters (Chun Kuan Lee) Pull request description: Fix broken exclusion list in functional tests. See https://github.com/bitcoin/bitcoin/pull/14007#pullrequestreview-158309105 Tree-SHA512: b6c2b86fef13e3c00c695adaeeb3e47ee9b48877c71bc605d24201ce931b2ef3ae9f5f199071fa1ec5de2d7aadc478410094c380cc297922e683e9b2569cda03
2018-09-27Merge #14307: Consolidate redundant implementations of ParseHashStrMarcoFalke
9c5af58d51 Consolidate redundant implementations of ParseHashStr (Ben Woosley) Pull request description: This change: * adds a length check to all calls to `ParseHashStr`, appropriate given its use to populate a 256-bit number from a hex str * allows the caller to handle the failure, which allows for the more appropriate `JSONRPCError` on failure in `prioritisetransaction` rpc Relative to #14288 Tree-SHA512: baa791147e5ceb3c30c70df3981aaf807bf7d4a90a0be3625540b59aa4b9a9d303a452bfef18bf167cbb833ef9591b4ef5948bf4a1ce67b421d804ae8d20ea53
2018-09-27Merge #12246: Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabledMarcoFalke
a2a04a5abb Bugfix: Only run bitcoin-tx tests when bitcoin-tx is enabled (Luke Dashjr) 92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx (Luke Dashjr) Pull request description: Includes #5618 (which the reasons for rejecting no longer hold true) Tree-SHA512: f30a8e4a2f70166b7cabef77c4674163b3a9da14c6a547d34f00d1056a19bf4d23e22851eea726fad2afc8735d5473ae91122c770b65ac3886663dc20e2c5b70
2018-09-27Merge #14305: Tests: enforce critical class instance attributes in ↵MarcoFalke
functional tests, fix segwit test specificity e460232876 Document fixed attribute behavior in critical test framework classes. (Justin Turner Arthur) 17b42f4122 Check for specific tx acceptance failures based on script signature (Justin Turner Arthur) 3a4449e9ad Strictly enforce instance attrs in critical functional test classes. (Justin Turner Arthur) 1d0ce94a54 Fix for incorrect version attr set on functional test segwit block. (Justin Turner Arthur) ba923e32a0 test: Fix broken segwit test (practicalswift) Pull request description: No extra attributes will be able to be added to instances of the C++ class ports or of other critical classes without causing an exception. Helps prevent adding or depending on attributes that aren't in the intended object structure. It may prevent issues such as the one fixed in bitcoin/bitcoin#14300. This request fixes the erroneous version attribute used in the p2p_segwit.py functional tests. This pull includes the commit from bitcoin/bitcoin#14300. Tree-SHA512: 1b8c58e7aa0f71075ed5ff3e5be0a5182599108d8cd9bce682feac3b1842508124288e9335432b16a43f40f159c9710899e6d84af1b5868f48c947bc6f3e07ec
2018-09-26Document fixed attribute behavior in critical test framework classes.Justin Turner Arthur
Per @jimmysong's suggestion in bitcoin/bitcoin#14305. Also corrects module for network objects and wrappers.
2018-09-26Check for specific tx acceptance failures based on script signatureJustin Turner Arthur
2018-09-26Strictly enforce instance attrs in critical functional test classes.Justin Turner Arthur
Additionally, removed redundant parentheses and added PEP-8 compliant spacing around those classes.
2018-09-26Merge #14282: [wallet] Remove -usehdMarcoFalke
7ac911afe7 [docs] Add release notes for removing `-usehd` (John Newbery) 25548b2958 [wallet] Remove -usehd (John Newbery) Pull request description: `-usehd` is no longer used (except to tell the user that they've set it incorrectly for the wallet that they're loading). Remove it (in the same spirit as #14272) Tree-SHA512: 5bdcd2bb9bb8504a01343595bcd1bd433d97b730255152c725103c1ac3fa3a9d9e5220a4c29d4c72307cf803e1c09d31080f83603c23dc77263846e17b1826f0
2018-09-26Merge #14310: [wallet] Ensure wallet is unlocked before signingMarcoFalke
20442f617f [wallet] remove redundand restart node (gustavonalle) db15805668 [wallet] Ensure wallet is unlocked before signing (gustavonalle) Pull request description: Fixes #14082 Tree-SHA512: 200620a2ced934f958933aba34541565a992e5033cf04c4e2be48b99e7708973c85f8274968962cec943f0c1d76fb2faa5e056469bbf59ce7f768614572322f9
2018-09-25qa: Run more tests with wallet disabledMarcoFalke
2018-09-26tests: exclude all tests with difference parametersChun Kuan Lee
2018-09-25Merge #13877: utils: Make fs::path::string() always return utf-8 string on ↵MarcoFalke
Windows 2c3eade704 Make fs::path::string() always return utf-8 string (Chun Kuan Lee) Pull request description: Imbue `fs::path` with `std::codecvt_utf8_utf16` at `SetupEnvironment()`, so that default string encoding will be utf-8 inside `fs::path`. Tree-SHA512: 0cb59464d777278decbf24771fc5ff0cb2caa7bc2fe8ee5cd36c97a2324873a3caad131f08f050393b488316ee7f4ab0b28b7fa4699e41839f8e51b9867d5118
2018-09-25Consolidate redundant implementations of ParseHashStrBen Woosley
This change: * adds a length check to ParseHashStr, appropriate given its use to populate a 256-bit number from a hex str. * allows the caller to handle the failure, which allows for the more appropriate JSONRPCError on failure in prioritisetransaction rpc
2018-09-25[wallet] remove redundand restart nodegustavonalle
2018-09-24test: allow arguments to be forwarded to flake8 in lint-python.shJames O'Beirne
2018-09-25tests: write the notification to different files to avoid race conditionChun Kuan Lee
2018-09-24Merge #14007: tests: Run functional test on Windows and enable it on AppveyorMarcoFalke
661ac15a4a appveyor: Run functional tests on appveyor (Chun Kuan Lee) 2148c36b6e tests: Make it possible to run functional tests on Windows (Chun Kuan Lee) Pull request description: This PR do the following things: - Make functional tests compatible with Windows - Print color output in functional tests for Windows 10 - Run util and functional tests on appveyor - Do not run symlink tests on Windows Note: - The wallet_multiwallet.py fail is unrelated to the test framework, it's a bug related to c++ code or maybe dependencies. `bitcoind` would exit with 0xC0000005(Access violation) during shutdown occasionally. Disable this for now. - Not using `--failfast` because this is still in experimental. We should track if there is any other error. - Disable ZMQ tests because the python zmq library could cause access violation sometimes. - Disable `feature_notifications` because Bitcoin Core handles the command in different thread, whicha can cause a race condition. Tree-SHA512: b76db137d264e62a5c130e1cbca7a2ca002a7a0f4153fa0b92c1ea6c9c09ef0533e11c49bdbd566c472d8ff59f245758feb5e5a6ec6cb6bb66a1c67bab5fa48a
2018-09-24Merge #13424: Consistently validate txid / blockhash length and encoding in ↵MarcoFalke
rpc calls 5eb20f81d9 Consistently use ParseHashV to validate hash inputs in rpc (Ben Woosley) Pull request description: ParseHashV validates the length and encoding of the string and throws an informative RPC error on failure, which is as good or better than these alternative calls. Note I switched ParseHashV to check string length first, because IsHex tests that the length is even, and an error like: "must be of length 64 (not 63, for X)" is much more informative than "must be hexadecimal string (not X)" in that case. Split from #13420 Tree-SHA512: f0786b41c0d7793ff76e4b2bb35547873070bbf7561d510029e8edb93f59176277efcd4d183b3185532ea69fc0bbbf3dbe9e19362e8017007ae9d51266cd78ae
2018-09-24[wallet] Ensure wallet is unlocked before signinggustavonalle
2018-09-23Fix for incorrect version attr set on functional test segwit block.Justin Turner Arthur
2018-09-23test: Fix broken segwit testpracticalswift
2018-09-23[test] Remove deprecated addwitnessaddress from feature_segwit.pyJohn Newbery
2018-09-23[test] Remove deprecated addwitnessaddress from wallet_bumpfee.pyJohn Newbery
2018-09-23[test] Remove deprecated addwitnessaddress from p2p_compactblocks.pyJohn Newbery
2018-09-23[tests] Remove deprecated addwitnessaddress call from wallet_dump.pyJohn Newbery
addwitnessaddress is deprecated. Remove the call to that RPC from wallet_dump.py and improve testing of all types of address (legacy, p2sh-segwit and bech32)
2018-09-23[tests] Remove deprecated addwitnessaddress call from feature_nulldummyJohn Newbery
addwitnessaddress is deprecated. Replace the call to addwitnessaddress with a call to getnewaddress(address_type='p2sh-segwit')
2018-09-23[test] Fix flake8 warnings in testsJohn Newbery
Fix all flake8 warnings in tests that are about to be updated to remove addwitnessaddress
2018-09-23Make fs::path::string() always return utf-8 stringChun Kuan Lee
2018-09-22Add test for conversion from non-witness to witness UTXOPieter Wuille
2018-09-20[wallet] Remove -usehdJohn Newbery
2018-09-19init: Remove deprecated args from hidden argsMarcoFalke
2018-09-18Merge #13152: [rpc] Add getnodeaddresses RPC commandMarcoFalke
a2eb6f5405 [rpc] Add getnodeaddresses RPC command (chris-belcher) Pull request description: Implements issue https://github.com/bitcoin/bitcoin/issues/9463 New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method. Please advise me on the best approach for writing an automated test. By my reading the getaddr p2p method also isn't really tested. Tree-SHA512: ad03abf518847476495b76a2f5394b8030aa86654429167fa618e21460abb505c10ef9817ec1b80472320d41d0aff5dc94a8efce023aaaaf5e81386aa92b852b
2018-09-17[rpc] Add getnodeaddresses RPC commandchris-belcher
New getnodeaddresses call gives access via RPC to the peers known by the node. It may be useful for bitcoin wallets to broadcast their transactions over tor for improved privacy without using the centralized DNS seeds. getnodeaddresses is very similar to the getaddr p2p method. Tests the new rpc call by feeding IP address to a test node via the p2p protocol, then obtaining someone of those addresses with getnodeaddresses and checking that they are a subset.
2018-09-17[qa] Test for duplicate inputs within a transactionSuhas Daftuar
2018-09-17Changed functional tests which do not require wallets to run withoutsanket1729
skipping .Addreses #14216. Changed get_deterministic_priv_key() to a named tuple
2018-09-17tests: Make it possible to run functional tests on WindowsChun Kuan Lee
2018-09-16tests: Reorder tests and move most of extended tests up to normal testsChun Kuan Lee
2018-09-14Merge #12493: [wallet] Reopen CDBEnv after encryption instead of shutting downWladimir J. van der Laan
c1dde3a949b36ce9c2155777b3fa1372e7ed97d8 No longer shutdown after encrypting the wallet (Andrew Chow) d7637c5a3f1d62922594cdfb6272e30dacf60ce9 After encrypting the wallet, reload the database environment (Andrew Chow) 5d296ac810755dc47f105eb95b52b7e2bcb8aea8 Add function to close all Db's and reload the databae environment (Andrew Chow) a769461d5e37ddcb771ae836254fdc69177a28c4 Move BerkeleyEnvironment deletion from internal method to callsite (Andrew Chow) Pull request description: This is the replacement for #11678 which implements @ryanofsky's [suggestion](https://github.com/bitcoin/bitcoin/pull/11678#pullrequestreview-76464511). Shutting down the software was to prevent the BDB environment from writing unencrypted private keys to disk in the database log files, as was noted [here](https://bitcointalk.org/index.php?topic=51474.msg616068#msg616068). This PR replaces the shutdown behavior with a CDBEnv flush, close, and reopen which achieves the same effect: everything is cleanly flushed and closed, the log files are removed, and then the environment reopened to continue normal operation. To ensure that no unencrypted private keys are in the log files after encrypting the wallet, I wrote [this script](https://gist.github.com/achow101/7f7143e6c3d3fdc034d3470e72823e9d) to pull private keys from the original wallet file and searches for these keys in the log files (note that you will have to change your file paths to make it work on your own machine). As for concerns about private keys being written to slack space or being kept in memory, these behaviors no longer exist after the original wallet encryption PR and the shutting down solution from 2011. cc @ryanofsky Tree-SHA512: 34b894283b0677a873d06dee46dff8424dec85a2973009ac9b84bcf3d22d05f227c494168c395219d9aee3178e420cf70d4b3eeacc9785aa86b6015d25758e75
2018-09-13Merge #14215: [qa] Use correct python index slices in example testMarcoFalke
9dcb6763fb [qa] Use correct python index slices in example test (Suhas Daftuar) Pull request description: There's an off-by-one in the list indices used in example_test.py. Tree-SHA512: d75b77c1e0b3931d02dfa043da4cb6fe8e62864a73717ce5c184d9dbeb25579342c6365cc7bbcc7c4382d76a320a528bf3c69107854dfc6fa704133d0ba11012
2018-09-13Merge #14179: qa: Fixups to "Run all tests even if wallet is not compiled"MarcoFalke
fa8433e379 qa: Remove unneded import_deterministic_coinbase_privkeys overwrite, add comments (MarcoFalke) e413c2ddd1 qa: Fix codespell error and have lint-spelling error instead of warn (MarcoFalke) Pull request description: Currently the functional tests require the wallet module to be compiled into the Bitcoin Core executable. For example the premine (or datadir cache) to speed up tests when run in parallel would mine a bunch of blocks and store the private keys to sign the coinbase tx outputs in a wallet. There is no need to have the overhead of the whole wallet module by using keys that are deterministic for all runs. Note that this change most likely requires the `./test/cache/` to be cleared. Tree-SHA512: 9ce26036b0e10f0f888f66a1e50be6a357343f9ffb302ae24a7bb3df2f083a31702ef308b738a03b08a1b623aeddac5d6563dc1b15078c0357b7dafad7808ec3
2018-09-13[qa] Use correct python index slices in example testSuhas Daftuar