From 417f71a58778d4759d318706c37773d357774bea Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 4 May 2023 17:19:15 +0100 Subject: [PATCH] Merge bitcoin/bitcoin#27422: test: add coverage to rpc_scantxoutset.py 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5 test: add coverage to ensure the first arg of scantxoutset is needed (ismaelsadeeq) Pull request description: Include a test that checks whether the first argument of scantxoutset RPC call "start" is required. The rpc call should fail if the "start" argument is not provided. ACKs for top commit: MarcoFalke: lgtm ACK 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5 Tree-SHA512: 6a456af9f3ccd5437be2edcd61936eb9f9c21ab926a6056c2c11b6b5121d1caca4e1f2ffd09015f9414af152c635a20e1da041eefdef980afbe8a0e8ccce07bd --- test/functional/rpc_scantxoutset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/rpc_scantxoutset.py b/test/functional/rpc_scantxoutset.py index fdff1617e1..43ec5e6832 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -120,6 +120,9 @@ class ScantxoutsetTest(BitcoinTestFramework): assert_equal(self.nodes[0].scantxoutset("status"), None) assert_equal(self.nodes[0].scantxoutset("abort"), False) + # check that first arg is needed + assert_raises_rpc_error(-1, "scantxoutset \"action\" ( [scanobjects,...] )", self.nodes[0].scantxoutset) + # Check that second arg is needed for start assert_raises_rpc_error(-1, "scanobjects argument is required for the start action", self.nodes[0].scantxoutset, "start")