Skip to content

Commit

Permalink
Merge bitcoin#27453: test: added coverage to rpc_scantxoutset.py
Browse files Browse the repository at this point in the history
24d55fb test: added coverage to rpc_scantxoutset.py (kevkevin)

Pull request description:

  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.

  Relavant: mentioned in bitcoin#27422

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 24d55fb
  theStack:
    ACK 24d55fb

Tree-SHA512: 4b804235d3fa17c7bf492068ab47c1f87cb6cfc1a428c51e273ec059d3c41f581bcc467bb5d6d8bbf2fab14c60cd1c52a30c50009efe1c9b5adee70c88897ad9
  • Loading branch information
fanquake committed May 2, 2023
2 parents cfe5da4 + 24d55fb commit d654c76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/rpc_scantxoutset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit d654c76

Please sign in to comment.