aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/test_framework
AgeCommit message (Collapse)Author
2017-02-23Merge #9577: Fix docstrings in qa testsMarcoFalke
3f95a80 Fix docstrings in qa tests (John Newbery)
2017-02-23Fix docstrings in qa testsJohn Newbery
This commit fixes the module-level docstrings for the tests and helper modules in qa. Many of these tests were uncommented previously - this commit ensures that every test case has at least a minimum level of commenting.
2017-02-23qa: Check return code when stopping nodesMarcoFalke
This includes work by jnewbery
2017-02-14Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 secWladimir J. van der Laan
66f861a Add a test for P2P inactivity timeouts (Matt Corallo) b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo) 8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo) 2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
2017-02-08qa: Expose on-connection to mininode listenersMatt Corallo
2017-02-08qa: mininode learns when a socket connects, not its first actionMatt Corallo
2017-02-08Fix RPC failure testingJohn Newbery
Make sure that RPC tests are actually checking failures correctly by: - Catching JSON RPC exceptions and verifying the error codes and messages. - Failing the test case if the JSON RPC exception isn't raised.
2017-01-12Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.Wladimir J. van der Laan
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
2017-01-05test: Add test for RPC named argumentsWladimir J. van der Laan
Add RPC testcase for RPC named arguments.
2017-01-05authproxy: Add support for RPC named argumentsWladimir J. van der Laan
2016-12-13Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'.Chris Moore
2016-12-04[qa] pruning: Use cached utxo set to run fasterMarcoFalke
2016-12-02Merge #9221: [qa] Get rid of duplicate codeMarcoFalke
facbfa5 [qa] Get rid of duplicate code (MarcoFalke)
2016-12-02[qa] Get rid of duplicate codeMarcoFalke
2016-11-30[qa] Dump debug logs on travis failures.Suhas Daftuar
2016-11-28Fix some typosfsb4000
2016-11-23Merge #9139: Change sync_blocks to pick smarter maxheight (on top of #9196)MarcoFalke
1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
2016-11-21Make test constant consistent with consensus.hBtcDrak
2016-11-21Merge #8872: Remove block-request logic from INV message processingWladimir J. van der Laan
037159c Remove block-request logic from INV message processing (Matt Corallo) 3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo) d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
2016-11-15[qa] add assert_raises_message to check specific error messagemrbandrews
2016-11-14[qa] Avoid 2 list comprehensions in sync_blocksRussell Yanofsky
2016-11-14[qa] Fix sync_blocks timeout argumentRussell Yanofsky
Motivation for this change is mainly to make sync_blocks behavior easier to understand. Behavior is unchanged in the normal case when there are only 2 nodes in the rpc_connections set. When there are more than 2 nodes, the previous "timeout -= wait" statement wouldn't take into account time spent waiting for all nodes and as a result could lead to blocking for longer than the requested timeout.
2016-11-14[qa] Improve sync_blocks error messages.Russell Yanofsky
2016-11-11[qa] Change sync_blocks to pick smarter maxheightRussell Yanofsky
Instead of syncing to max height returned by the waitforblockheight RPC, sync to the max height returned by the getblockcount RPC. This change was suggested by Suhas Daftuar <sdaftuar@chaincode.com>.
2016-11-10Merge #9097: [qa] Rework sync_* and preciousblock.pyMarcoFalke
fa97ccb [qa] util: Rework sync_*() (MarcoFalke) fac1141 [qa] preciousblock: Use assert_equal and BitcoinTestFramework.__init__ (MarcoFalke)
2016-11-09Merge #8894: [Testing] Include fRelay in mininode version messagesWladimir J. van der Laan
e5d682f Fix mininode version message format (jnewbery)
2016-11-09Fix mininode version message formatjnewbery
2016-11-07[qa] Make comptool push blocks instead of relying on inv-fetchmrbandrews
2016-11-07[qa] test_framework: Exit when tmpdir existsMarcoFalke
2016-11-07[qa] util: Rework sync_*()MarcoFalke
* Only allow named args in sync_*() * Make sync_* fails more verbose * Add timeout to sync_chain()
2016-11-07Merge #9077: [qa] Increase wallet-dump RPC timeoutMarcoFalke
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky) 8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
2016-11-07[qa] Add more helpful RPC timeout messageRussell Yanofsky
Replace previous timeout('timed out',) exception with more detailed error.
2016-11-07[qa] Increase wallet-dump RPC timeoutRussell Yanofsky
Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a timeout error that seemed to happen regularly (around 50% of builds) on a particular jenkins server during the first getnewaddress RPC call made by the test. The failing stack trace looked like: Unexpected exception caught during testing: timeout('timed out',) File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main self.run_test() File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test addr = self.nodes[0].getnewaddress() File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__ response = self._request('POST', self.__url.path, postdata.encode('utf-8')) File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request return self._get_response() File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response http_response = self.__conn.getresponse() File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse response.begin() File "/usr/lib/python3.4/http/client.py", line 351, in begin version, status, reason = self._read_status() File "/usr/lib/python3.4/http/client.py", line 313, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.4/socket.py", line 374, in readinto return self._sock.recv_into(b)
2016-11-06[copyright] copyright header style uniformisle2983
Three categories of modifications: 1) 1 instance of 'The Bitcoin Core developers \n', 1 instance of 'the Bitcoin Core developers\n', 3 instances of 'Bitcoin Core Developers\n', and 12 instances of 'The Bitcoin developers\n' are made uniform with the 443 instances of 'The Bitcoin Core developers\n' 2) 3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6 instances of 'BitPay Inc\.\n' 3) 4 instances where there was no '(c)' between the 'Copyright' and the year where it deviates from the style of the local directory.
2016-10-18Merge #6996: Add preciousblock RPCWladimir J. van der Laan
5805ac8 Add preciousblock tests (Pieter Wuille) 5127c4f Add preciousblock RPC (Pieter Wuille)
2016-10-17test segwit uncompressed key fixesJohnson Lau
2016-10-16Make test framework produce lowS signaturesJohnson Lau
2016-10-04[qa] Add support for compactblocks v2 to mininodeSuhas Daftuar
2016-10-04[qa] Fix bug in mininode witness deserializationSuhas Daftuar
Also improve tx printing
2016-10-03Merge #8860: [qa] util: Move wait_bitcoinds() into stop_nodes()MarcoFalke
fa7c35c [qa] util: Move wait_bitcoinds() into stop_nodes() (MarcoFalke)
2016-10-02[qa] mininode: Only allow named args in wait_untilMarcoFalke
2016-10-02[qa] util: Move wait_bitcoinds() into stop_nodes()MarcoFalke
2016-10-01Merge #8854: [qa] Fix race condition in p2p-compactblocks testMarcoFalke
b5fd666 [qa] Fix race condition in p2p-compactblocks test (Suhas Daftuar)
2016-09-30[qa] Fix race condition in p2p-compactblocks testSuhas Daftuar
Also fix a bug in the sync_with_ping() helper function
2016-09-30Merge #8839: test: Avoid ConnectionResetErrors during RPC testsWladimir J. van der Laan
1d28faf test: Avoid ConnectionResetErrors during RPC tests (Wladimir J. van der Laan)
2016-09-29test: Explicitly set encoding to utf8 when opening text filesWladimir J. van der Laan
These are text files but their encoding does not depend on the locale. Not all of them require utf8 but it is better to fix it at something to remove potential unpredictability. This is necessary on FreeBSD where no locale is set by default, and apparently Python defaults not only the terminal encoding to the locale but that of every text file. So without LOCALE environment it defaults text file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`. Luckily the locale doesn't affect the default encoding for str.encode() and bytes.decode() on Python 3, so this is the only change necessary.
2016-09-29test: Avoid ConnectionResetErrors during RPC testsWladimir J. van der Laan
This is necessary on FreeBSD and MacOSX, at least. See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213
2016-09-29[qa] blockstore: Switch to dumb dbmMarcoFalke
2016-09-25tests: Add exception error message for JSONRPCExceptionWladimir J. van der Laan
This improves error reporting if `JSONRPCException` is not specifically caught and ends up in Python's default backtrace handler. Before: ``` Traceback (most recent call last): File "/.../projects/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 153, in __call__ raise JSONRPCException(response['error']) test_framework.authproxy.JSONRPCException ``` After: ``` Traceback (most recent call last): File "/.../projects/bitcoin/bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 152, in __call__ raise JSONRPCException(response['error']) test_framework.authproxy.JSONRPCException: Unknown named parameter random (-8) ```
2016-09-19Merge #8676: Add missing copyright headersWladimir J. van der Laan
783e930 [copyright] Add missing copyright headers (isle2983)