zcashd/qa/rpc-tests
Jack Grigg 03db5c8ca3
Tie sync_blocks in RPC tests to notifier thread
2019-12-18 15:06:54 -06:00
..
test_framework Tie sync_blocks in RPC tests to notifier thread 2019-12-18 15:06:54 -06:00
.gitignore Python-based regression tests 2014-02-28 15:24:31 -05:00
README.md Fix some typos in rpc-tests readme 2018-08-05 21:51:35 -07:00
addressindex.py insightexplorer: formatting, pyflakes cleanups 2019-08-09 15:27:52 -06:00
bip65-cltv-p2p.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
bipdersig-p2p.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
blockchain.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
decodescript.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
disablewallet.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
finalsaplingroot.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
forknotify.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
fundrawtransaction.py Implement watchonly support in fundrawtransaction 2019-11-14 15:46:07 +00:00
getblocktemplate.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
getblocktemplate_longpoll.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
getblocktemplate_proposals.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
getchaintips.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
getrawtransaction_insight.py add spentindex RPC for bitcore block explorer 2019-08-07 14:23:42 -06:00
hardforkdetection.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
httpbasics.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
invalidateblock.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
invalidblockrequest.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
key_import_export.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
keypool.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
listtransactions.py Add p2sh option to importaddress to import redeemScripts 2019-11-14 14:48:21 +00:00
maxblocksinflight.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
mempool_limit.py Remove dots and underscores from parameter names 2019-10-21 09:20:17 -06:00
mempool_nu_activation.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mempool_reorg.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mempool_resurrect_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
mempool_spendcoinbase.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
mempool_tx_expiry.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mergetoaddress_helper.py Remove option mempooltxinputlimit 2019-11-19 10:35:39 +01:00
mergetoaddress_mixednotes.py remove zmergetoaddress from experimental state in rpc-tests 2019-11-06 10:57:10 -03:00
mergetoaddress_sapling.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
mergetoaddress_sprout.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
merkle_blocks.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
multi_rpc.py pyflakes fixes 2019-12-04 19:16:20 +00:00
nodehandling.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
p2p-acceptblock.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
p2p_node_bloom.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
p2p_nu_peer_management.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
p2p_txexpiringsoon.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
p2p_txexpiry_dos.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
paymentdisclosure.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
prioritisetransaction.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
proton_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
proxy_test.py Update `import *` to unblock pyflakes from failing 2019-12-02 11:38:33 -08:00
pruning.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
rawtransactions.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
receivedby.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
regtest_signrawtransaction.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
reindex.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
reorg_limit.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
rest.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
rewind_index.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
rpcbind_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
script_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
shorter_block_times.py Add copyright info 2019-08-05 19:05:11 -06:00
signrawtransaction_offline.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
signrawtransactions.py Test setting an expiry height of 0. 2019-09-26 20:43:52 +01:00
smartfees.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
spentindex.py insightexplorer: formatting, pyflakes cleanups 2019-08-09 15:27:52 -06:00
sprout_sapling_migration.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
timestampindex.py add timestampindex related RPC getblockhashes 2019-08-08 14:35:07 -06:00
turnstile.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
tx_expiry_helper.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
txn_doublespend.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_1941.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
wallet_addresses.py Fix typo 2019-11-12 12:51:45 +02:00
wallet_anchorfork.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
wallet_changeaddresses.py Update to stop random race error from assert 2019-12-02 17:39:00 -08:00
wallet_changeindicator.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_import_export.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_listnotes.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_listreceived.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_nullifiers.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
wallet_overwintertx.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_persistence.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_sapling.py remove zmergetoaddress from experimental state in rpc-tests 2019-11-06 10:57:10 -03:00
wallet_shieldcoinbase.py test: Update RPC tests to use a minimum of Sapling 2019-08-22 17:26:54 +01:00
wallet_shieldcoinbase_sapling.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
wallet_shieldcoinbase_sprout.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
wallet_shieldingcoinbase.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
wallet_treestate.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
walletbackup.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
zapwallettxes.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
zcjoinsplit.py Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
zcjoinsplitdoublespend.py Make pythonisms consistent 2018-12-18 12:16:23 -08:00
zkey_import_export.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00
zmq_test.py Replace http with https: in links to the MIT license. 2019-07-18 15:26:01 +01:00

README.md

Regression tests of RPC interface

test_framework/test_framework.py

Base class for RPC regression tests.

test_framework/util.py

Generally useful functions.

Notes

You can run a single test by calling qa/pull-tester/rpc-tests.sh <testname>.

Run all possible tests with qa/pull-tester/rpc-tests.sh -extended.

Possible options:

-h, --help       show this help message and exit
  --nocleanup      Leave zcashds and test.* datadir on exit or error
  --noshutdown     Don't stop bitcoinds after the test execution
  --srcdir=SRCDIR  Source directory containing zcashd/zcash-cli (default:
                   ../../src)
  --tmpdir=TMPDIR  Root directory for datadirs
  --tracerpc       Print out all RPC calls as they are made

If you set the environment variable PYTHON_DEBUG=1 you will get some debug output (example: PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.sh wallet).

A 200-block -regtest blockchain and wallets for four nodes is created the first time a regression test is run and is stored in the cache/ directory. Each node has the miner subsidy from 25 mature blocks (25*10=250 ZEC) in its wallet.

After the first run, the cache/ blockchain and wallets are copied into a temporary directory and used as the initial test state.

If you get into a bad state, you should be able to recover with:

rm -rf cache
killall zcashd