aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_runner.py
AgeCommit message (Collapse)Author
2017-10-18Merge #11486: [tests] Add uacomment testsWladimir J. van der Laan
c5dfa90 [tests] Add uacomment tests (Cristian Mircea Messel) Pull request description: Checks for setting the value, max length and reserved characters Tree-SHA512: a62e2cf8e455a3cd3987c0855f7bfc49de47504c01263e3573366e3cbff400c5678224773d4f1e4ac684fff34d987994e490a0978c4da05ff2a4bfa972c84723
2017-10-16[tests] Don't subclass from object for Python 3John Newbery
2017-10-11[tests] Add uacomment testsCristian Mircea Messel
Checks for setting the value, max length and reserved characters
2017-10-11Merge #10941: Add blocknotify and walletnotify functional testsWladimir J. van der Laan
857b32b [tests] Add -walletnotify functional test (João Barbosa) df18d29 [tests] Add -blocknotify functional test (João Barbosa) 9c72a46 [tests] Tidy up forknotify.py (John Newbery) Pull request description: This patch adds the missing functional tests for `-blocknotify` and `-walletnotify` notifications. The `-alertnotify` test file `forknotify.py` is renamed to `notifications.py` to accommodate the new tests. Credits to @jnewbery for this cleanup and unification. Tree-SHA512: ee7b28b9f1bd225587efaefa6427c6d080ccb50ead390b23d94717c137a317183b37be00da0b2bffedd4192a363c971dea510d78d29278eb9fa76374f7855c09
2017-10-10[tests] Add -blocknotify functional testJoão Barbosa
2017-10-03[test] P2P functional test for certain fingerprinting protectionsJim Posen
2017-09-26[rpc] [tests] Add deprecated RPC testCristian Mircea Messel
2017-09-05[qa] Test nMinimumChainWorkSuhas Daftuar
Nodes don't consider themselves out of "initial block download" until their active chain has more work than nMinimumChainWork. While in initial block download, nodes won't relay blocks to their peers, so test that this parameter functions as intended by verifying that block relay only succeeds past a given node once its nMinimumChainWork has been exceeded.
2017-08-24Merge #10798: [tests] [utils] test bitcoin-cliMarcoFalke
c6ec4358a [tests] Add bitcoin_cli.py test script (John Newbery) b23549f6e [tests] add TestNodeCLI class for calling bitcoin-cli for a node (John Newbery) Pull request description: We don't test bitcoin-cli at all. That means that we can miss inconsistencies between the bitcoin-cli client and the RPC interface, such as #10698 and #10747. It also means that the various bitcoin-cli options and features are untested and regressions could be silently introduced. Let's fix that. This PR adds bitcoin-cli testing in the python functional test_framework: 1. Add a bitcoin_cli.py test script that tests bitcoin-cli. At the moment it only tests that the result of `getinfo` is the same if you run it as an RPC or through bitcoin-cli, but can easily be extended to test additional bitcoin-cli features **EDIT: `--usecli` option is moved to a separate PR. This PR now only covers the bitcoin_cli.py test.** 2. ~Add a `--usecli` option to the test framework. This changes the test to use bitcoin-cli for all RPC calls instead of using direct HTTP requests. This is somewhat experimental. It works for most tests, but there are some cases where it can't work transparently because:~ - ~the testcase is asserting on a specific error code, and bitcoin-cli returns a different error code from the direct RPC~ - ~we're sending a very large RPC request (eg `submitblock`) and it can't be serialized into a shell bitcoin-cli call.~ ~I think that even though `--usecli` doesn't work on all tests, it's still a useful experimental feature. Future potential enhancements:~ - ~enhance the framework to automatically skip tests that are known to fail with bitcoin-cli if the `--usecli` option is used.~ - ~run a subset of tests in Travis with `-usecli`~ This builds on and requires the `TestNode` PR #10711 . As an aside, this is a good demonstration of how tidy it is to add additional features/interfaces now that test node logic/state is encapsulated in a TestNode class. Addresses #10791 Tree-SHA512: a1e6be12e8e007f6f67b3d3bbcd142d835787300831eb38e6027a1ad25ca9d79c4bc99a41b19e31ee95205cba1b3b2d21a688b5909316aad70bfc2b4eb6d8a52
2017-08-16Merge #10680: Fix inconsistencies and grammar in various filesMarcoFalke
1d8df0141 Fix MD formatting in REST-interface.md and spelling mistake in test_runner.py (MeshCollider) 41f3e84aa Fix inconsistencies and grammar in various files (MeshCollider) Pull request description: Just a simple fix of some inconsistent capitalization, formatting and grammar in a few files (no code changes) Tree-SHA512: 60b12a5a5c69a1af4a25b7db0b32ed806ed62ad2966cee08b3792a7cfa7f51848fd485349b4c09e60a7eedfdf55ee730c51daa066d6e226ae404c93342bf3e13
2017-08-16Merge #10705: Trivial: spelling fixesMarcoFalke
f42fc1d50 doc: spelling fixes (klemens) Pull request description: patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ). Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2017-08-16doc: spelling fixesklemens
2017-08-15[tests] Add bitcoin_cli.py test scriptJohn Newbery
2017-08-15[tests] add TestNodeCLI class for calling bitcoin-cli for a nodeJohn Newbery
2017-08-14Merge #11022: Basic keypool topupWladimir J. van der Laan
d34957e [wallet] [tests] Add keypool topup functional test (Jonas Schnelli) 095142d [wallet] keypool mark-used and topup (John Newbery) c25d90f [wallet] Add HasUnusedKeys() helper (John Newbery) f2123e3 [wallet] Cache keyid -> keypool id mappings (John Newbery) 83f1ec3 [wallet] Don't hold cs_LastBlockFile while calling setBestChain (John Newbery) 2376bfc [wallet] [moveonly] Move LoadKeyPool to cpp (Matt Corallo) cab8557 [wallet] [moveonly] Move CAffectedKeysVisitor (Jonas Schnelli) Pull request description: This PR contains the first part of #10882 : - if a key from the keypool is used, mark all keys up to that key as used, and then try to top up the keypool - top up the keypool on startup Notably, it does not stop the node or prevent the best block from advancing if the keypool drops below a threshold (which means that transactions may be missed and funds lost if restoring from an old HD wallet backup). Tree-SHA512: ac681fefeaf7ec2aab2fa1da93d12273ea80bd05eb48d7b3b551ea6e5d975dd97ba7de52b7fba52993823280ac4079cc36cf78a27dac708107ebf8fb6326142b
2017-08-12test: Add resendwallettransactions functional testsJoão Barbosa
2017-08-10[wallet] [tests] Add keypool topup functional testJonas Schnelli
2017-08-08Merge #10695: [qa] Rewrite BIP65/BIP66 functional testsMarcoFalke
4ccc12a54 [qa] Rewrite BIP66 functional tests (Suhas Daftuar) d4f0d87b6 [qa] Rewrite BIP65 functional tests (Suhas Daftuar) Pull request description: After 122786d0e0170c73536360b705af711e1338adbf, BIP65 and BIP66 activate at particular fixed heights (without regard to version numbers of blocks below those heights). Rewrite the functional tests to take this into account, and remove two tests that weren't really testing anything. Moves the rewritten functional tests out of the extended test suite, so that they run in travis regularly. Note: I discovered that the ComparisonTestFramework (which the original versions of these p2p tests were written is, has a bug that caused them to not catch obvious errors, eg if you just comment out setting the script flags for these softforks in ConnectBlock, the versions of these tests in master do not fail(!) -- will separately PR a fix for the comparison test framework). Tree-SHA512: 2108b79951f2e980854d0d14ccc0fd1810a43dd4251fd6e3b203e7f104ea55e00650bb1a60a28c2801b4249f46563a8559ac3e3cd39db220914acfed0b3b163d
2017-07-25Revert "[tests] Allow tests to pass when stderr is non-empty"Wladimir J. van der Laan
This reverts commit d64ac3f4aab13a1a4e8d320b52e7a2b934e011b2 after further discussion. Tree-SHA512: db1e4ff5b17bcd6fd000a3d21aa74f6b7e4c194e0663c1896a100612671910a7cdadd896b59642420ea016598895b54a8468914847ebefef105a3c47c311d4b2
2017-07-25Merge #10703: [tests] Allow tests to pass when stderr is non-emptyMarcoFalke
d64ac3f [tests] Allow tests to pass when stderr is non-empty (Jonas Schnelli) Pull request description: Resurrect #10241 with nits addressed Not sure how much people want this. Would be useful for functional tests which cause bitcoind to print to stderr. Tree-SHA512: 28caccf7818fb3ed5a38caef7f77161b1678aa9b8fd12c2d1e76032f409f0d33c40f7ac91e0c8d908df4a44fd01cf97d657a08bae50c6ff17d07f5b2e20c3a6e
2017-07-21[QA] Avoid running multiwallet.py twiceJonas Schnelli
2017-07-20[wallet] [tests] Add listwallets to multiwallet testJohn Newbery
2017-07-17[QA] add basic multiwallet testJonas Schnelli
2017-07-11Merge #10190: [tests] mining functional tests (including regression test for ↵Wladimir J. van der Laan
submitblock) 11ba8e9 [tests] rename getblocktemplate_proposals.py to mining.py (John Newbery) b29dd41 [tests] add test for submit block (John Newbery) 9bf0d80 [tests] run successful test in getblocktemplate first (John Newbery) 82dc597 [tests] don't build blocks manually in getblocktemplate test (John Newbery) f82c709 [tests] clarify assertions in getblocktemplate test (John Newbery) 66c570a [tests] Don't build the coinbase manually in getblocktemplate test (John Newbery) 38b38cd [tests] getblocktemplate_proposals.py: add logging (John Newbery) 0a3a5ff [tests] Fix flake8 warnings in getblocktemplate tests (John Newbery) 32cffe6 [tests] Fix import order in getblocktemplate test (John Newbery) Tree-SHA512: a51a57314fa1c4c4b8a7896492ec6e677b6bed12387060def34a62e9dfbee7961f71bb5553fbd70028be61ae32eccf13fd255fa9651f908e9a5e64c28f43f00e
2017-07-06[qa] Rewrite BIP66 functional testsSuhas Daftuar
Rewrite the BIP66 functional tests to reflect height-based activation, and move it out of the extended test suite. Remove the unnecessary bipdersig.py test
2017-07-01Fix MD formatting in REST-interface.md and spelling mistake inMeshCollider
test_runner.py
2017-06-30[qa] Rewrite BIP65 functional testsSuhas Daftuar
After 122786d0e0170c73536360b705af711e1338adbf, BIP65 activates at a particular height (without regard to version numbers of blocks below that height). Rewrite the BIP65 functional tests to take this into account, and add a test case that exercises OP_CHECKLOCKTIMEVERIFY in a block where the soft-fork is active. Also moves the bip65 functional test out of the extended test suite.
2017-06-29[tests] Allow tests to pass when stderr is non-emptyJonas Schnelli
Tests which pass with non-empty stderr are reported as "passed with warnings"
2017-06-28Merge #10148: Use non-atomic flushing with block replayWladimir J. van der Laan
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar) d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo) eaca1b7 Random db flush crash simulator (Pieter Wuille) 0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille) 013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille) b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille) Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-27[tests] rename getblocktemplate_proposals.py to mining.pyJohn Newbery
2017-06-27Merge #10612: The young person's guide to the test_frameworkWladimir J. van der Laan
e7ba6c1 [tests] add example test (John Newbery) 76859e6 [tests] Update functional tests documentation (John Newbery) Tree-SHA512: 74eb464e965e16466f95b9eda7d1e89a31ef1ef204dd30e1b11ddf482336f12f33fa5ca3cc733b6eaf440c46401e663585af9caca202deddb440bbadce964a62
2017-06-27[tests] add example testJohn Newbery
2017-06-26[qa] Test non-atomic chainstate writesSuhas Daftuar
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the logic for recovering from a crash during chainstate flush. dbcrash.py is added to the extended tests, as it may take ~10 minutes to run Use _Exit() instead of exit() for crash simulation This eliminates stderr output such as: terminate called without an active exception or Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104. Eliminating the stderr output on crash simulation allows testing with test_runner.py, which reports a test as failed if stderr is produced.
2017-06-25[RPC] Add an uptime command that displays the amount of time that bitcoind ↵Ricardo Velhote
has been running
2017-06-18Merge #10555: [tests] various improvements to zmq_test.pyMarcoFalke
0a4912e [tests] timeout integration tests on travis after 20 minutes (John Newbery) 7c51e9f [tests] destroy zmq context in zmq_tests.py (John Newbery) b1bac1c [tests] in zmq test, timeout if message not received (John Newbery) 5ebd5f9 [tests] tidy up zmq_test.py (John Newbery) 4a0c08f [tests] update zmq test to use correct config.ini file (John Newbery) Tree-SHA512: 5e607af2f2dc5c73fba4b2d3890097580a7525f6a4996c7c78f01822e45e0054fd0a225ea53fce6308804e560cced6de6cf5d16137469dcf100b2e9643e08d03
2017-06-12[tests] timeout integration tests on travis after 20 minutesJohn Newbery
2017-06-08[tests] tidy up zmq_test.pyJohn Newbery
2017-06-08Tests for wallet encryption stuffAndrew Chow
Added a functional test which tests the encryptwallet, walletpassphrase, walletpassphrasechange, and walletlock RPCs
2017-06-06Merge #10331: Share config between util and functional testsMarcoFalke
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery) 95836c5 Use shared config file for functional and util tests (John Newbery) 89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery) e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery) ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery) Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f
2017-05-22Merge #10433: [tests] improve tmpdir structureMarcoFalke
b040243 [tests] improve tmpdir structure (John Newbery) Tree-SHA512: b21ad555c3c23a43087b893ad18bd2398e1df91b82c0bf1804d07fdb582600a1c339e6f4aaca58074e52f146f459943a0e492abc045b2666d4a3a7e0e455d6dd
2017-05-18[tests] improve tmpdir structureJohn Newbery
2017-05-14qa: Warn when specified test is not foundMarcoFalke
2017-05-03Use shared config file for functional and util testsJohn Newbery
The functional tests and util tests both require a config file that is generated by ./configure. This commit merges those two config files into a single configuration file that can be shared by both tests. The config from config.ini is put into a Namespace object to maintain the interface with bctest.py. A future commit could change this interface to use a dictionary instead of a namespace.
2017-05-03Merge #10327: [tests] remove import-abort-rescan.pyWladimir J. van der Laan
981e586 [tests] remove import-abort-rescan.py (John Newbery) Tree-SHA512: 8658d42b5ecdefbb71c55849036ee4e8e113abbc9c549730524009fb6eacc50340ffb7ef99fb35809d4abd6b304d491a618e45ff6ded1990f01f18cbcebf2b12
2017-05-03[tests] remove import-abort-rescan.pyJohn Newbery
Reverts PR 10225
2017-05-03Merge #9966: Control mempool persistence using a command line parameterWladimir J. van der Laan
a750d77 Add tests for mempool persistence (John Newbery) 91c91e1 Control mempool persistence using a command line parameter. (John Newbery) Tree-SHA512: 157d01cefd1903b8bfc5cbab42a3cc5e9c1094179bf4b64b3d34c0d4d9b976d593755bfea5c41c631cb758e1de17c6c2058c130d487d20560b7c0bafcddfa520
2017-05-01[tests] allow zmq test to be run in out-of-tree buildsJohn Newbery
2017-04-25Merge #10225: [test] Add aborttrescan testsWladimir J. van der Laan
ed60970 [test] Test abortrescan command. (Karl-Johan Alm) Tree-SHA512: 7f617adba65a6df8fdc4b01432992926a06c4a05da4e657653436f7716301fa5d6249d77894a097737e7fb9e118925883f2425c639058b8973680339bb8e61b6
2017-04-23Merge #10097: Move zmq test skipping logic into individual test case.MarcoFalke
6803e09 Move zmq test skipping logic into individual test case. (John Newbery) Tree-SHA512: 9d166b53e9acf386c4dafc860b38e2901b331a7505bba9714a2f4e3bdef68b0316c8b76fddbfb620835ddee549cf32fffb3a96a19b0799ad94f2553f55f19a35
2017-04-23Merge #10023: [tests] remove maxblocksinflight.py (functionality covered by ↵MarcoFalke
other test) 5f4bcf2 [tests] Remove maxblocksinflight testcase (John Newbery) Tree-SHA512: 827c8b12f4b52684a973bbfc508c5906e640572e22a96b9420a7aea86ad8d4aa4d6fcc2bb091f747e2fdd18c897e0456baff254bd5e3ceaf721bd3f09a2fd60b