Skip to content

Commit 7d452d8

Browse files
committed
test: add coverage for /deploymentinfo passing a blockhash
1 parent ce887ea commit 7d452d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/interface_rest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,10 @@ def run_test(self):
421421
deployment_info = self.nodes[0].getdeploymentinfo()
422422
assert_equal(deployment_info, self.test_rest_request('/deploymentinfo'))
423423

424+
previous_bb_hash = self.nodes[0].getblockhash(self.nodes[0].getblockcount() - 1)
425+
deployment_info = self.nodes[0].getdeploymentinfo(previous_bb_hash)
426+
assert_equal(deployment_info, self.test_rest_request(f"/deploymentinfo/{previous_bb_hash}"))
427+
424428
non_existing_blockhash = '42759cde25462784395a337460bde75f58e73d3f08bd31fdc3507cbac856a2c4'
425429
resp = self.test_rest_request(f'/deploymentinfo/{non_existing_blockhash}', ret_type=RetType.OBJ, status=400)
426430
assert_equal(resp.read().decode('utf-8').rstrip(), "Block not found")

0 commit comments

Comments
 (0)