From 24d55fb9cfab88f546df35be5c0069b9b645438c Mon Sep 17 00:00:00 2001 From: kevkevin Date: Wed, 12 Apr 2023 10:54:32 -0500 Subject: [PATCH] test: added coverage to rpc_scantxoutset.py Included a test that checks if an invalid first argument is entered we receive a rpc error. The rpc should fail if "start", "status" or "abort" is not the first command. --- 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..f97636aae7bd5 100755 --- a/test/functional/rpc_scantxoutset.py +++ b/test/functional/rpc_scantxoutset.py @@ -123,6 +123,9 @@ def run_test(self): # 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") + # Check that invalid command give error + assert_raises_rpc_error(-8, "Invalid action 'invalid_command'", self.nodes[0].scantxoutset, "invalid_command") + if __name__ == "__main__": ScantxoutsetTest().main()