Skip to content

Commit

Permalink
test: add coverage for /deploymentinfo passing a blockhash
Browse files Browse the repository at this point in the history
Github-Pull: #27853
Rebased-From: 7d452d8
  • Loading branch information
brunoerg authored and fanquake committed Jun 15, 2023
1 parent 72ead86 commit d845a3e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/interface_rest.py
Expand Up @@ -421,6 +421,10 @@ def run_test(self):
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")
Expand Down

0 comments on commit d845a3e

Please sign in to comment.