From 7e3d4f8e86e86f32d8911abd458b9e7c939ef3d5 Mon Sep 17 00:00:00 2001 From: ismaelsadeeq <ask4ismailsadiq@gmail.com> Date: Wed, 5 Apr 2023 11:03:06 +0100 Subject: [PATCH] test: add coverage to ensure the first arg of scantxoutset is needed Include a test that checks whether the first argument of scantxoutset RPC call is required. The rpc call should fail if the "start" argument is not provided. --- 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 dca965aacb053..85c5d6c84c002 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -120,6 +120,9 @@ def run_test(self): 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")