diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-01-06 03:28:20 -0900 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-01-06 03:28:23 -0900 |
commit | 45173fa6fca9537abb0a0554f731d14b9f89c456 (patch) | |
tree | 31f1ccdd1ad0ed7f929251160ee3327dc4f9f0fb /test | |
parent | b3ecb7bab6074377d87c700bf0c5d351e5d3174f (diff) | |
parent | 7f67dd0aa67ec030d5793dcc69594173d5b69fcc (diff) | |
download | bitcoin-45173fa6fca9537abb0a0554f731d14b9f89c456.tar.xz |
Merge #12079: Improve prioritisetransaction test coverage
7f67dd0aa6 [qa] Improve prioritisetransaction functional test (João Barbosa)
Pull request description:
Tree-SHA512: 7a5c446772069cd9ace085ae2635e1f61870c597e2216614628f4b6ebfe209b29f381a182a6f60d09f43f22bb82b59bb573b5441fa8e7b958a5fd0d5aad80d86
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/prioritise_transaction.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/prioritise_transaction.py b/test/functional/prioritise_transaction.py index c10042ddb2..57954ce321 100755 --- a/test/functional/prioritise_transaction.py +++ b/test/functional/prioritise_transaction.py @@ -15,6 +15,25 @@ class PrioritiseTransactionTest(BitcoinTestFramework): self.extra_args = [["-printpriority=1"], ["-printpriority=1"]] def run_test(self): + # Test `prioritisetransaction` required parameters + assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction) + assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction, '') + assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction, '', 0) + + # Test `prioritisetransaction` invalid extra parameters + assert_raises_rpc_error(-1, "prioritisetransaction", self.nodes[0].prioritisetransaction, '', 0, 0, 0) + + # Test `prioritisetransaction` invalid `txid` + assert_raises_rpc_error(-1, "txid must be hexadecimal string", self.nodes[0].prioritisetransaction, txid='foo', fee_delta=0) + + # Test `prioritisetransaction` invalid `dummy` + txid = '1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000' + assert_raises_rpc_error(-1, "JSON value is not a number as expected", self.nodes[0].prioritisetransaction, txid, 'foo', 0) + assert_raises_rpc_error(-8, "Priority is no longer supported, dummy argument to prioritisetransaction must be 0.", self.nodes[0].prioritisetransaction, txid, 1, 0) + + # Test `prioritisetransaction` invalid `fee_delta` + assert_raises_rpc_error(-1, "JSON value is not an integer as expected", self.nodes[0].prioritisetransaction, txid=txid, fee_delta='foo') + self.txouts = gen_return_txouts() self.relayfee = self.nodes[0].getnetworkinfo()['relayfee'] |