diff options
author | brunoerg <brunoely.gc@gmail.com> | 2023-06-10 23:26:58 -0300 |
---|---|---|
committer | brunoerg <brunoely.gc@gmail.com> | 2023-06-12 13:30:42 -0300 |
commit | 7d452d826a7056411077b870efc3872bb2fa45e4 (patch) | |
tree | 23a89f9d9e728562bebf796c75c0cf02b41322d1 /test/functional/interface_rest.py | |
parent | ce887eaf4917c337b21aa2e7811804ce003d36be (diff) | |
download | bitcoin-7d452d826a7056411077b870efc3872bb2fa45e4.tar.xz |
test: add coverage for `/deploymentinfo` passing a blockhash
Diffstat (limited to 'test/functional/interface_rest.py')
-rwxr-xr-x | test/functional/interface_rest.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py index 315d717986..1ba8f60d99 100755 --- a/test/functional/interface_rest.py +++ b/test/functional/interface_rest.py @@ -421,6 +421,10 @@ class RESTTest (BitcoinTestFramework): deployment_info = self.nodes[0].getdeploymentinfo() assert_equal(deployment_info, self.test_rest_request('/deploymentinfo')) + previous_bb_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount() - 1) + deployment_info = self.nodes[0].getdeploymentinfo(previous_bb_hash) + assert_equal(deployment_info, self.test_rest_request(f"/deploymentinfo/{previous_bb_hash}")) + non_existing_blockhash = '42759cde25462784395a337460bde75f58e73d3f08bd31fdc3507cbac856a2c4' resp = self.test_rest_request(f'/deploymentinfo/{non_existing_blockhash}', ret_type=RetType.OBJ, status=400) assert_equal(resp.read().decode('utf-8').rstrip(), "Block not found") |