Skip to content

Commit fc11cd8

Browse files
Merge dashpay#6077: test: functional tests for RPC getgovernanceinfo
3971613 feat: functional tests for RPC getgovernanceinfo (Konstantin Akimov) Pull request description: ## Issue being fixed or feature implemented dashpay/dash-issues#63 ## What was done? It adds functional test for `getgovernanceinfo` ## How Has This Been Tested? Run unit/functional tests Check output of `test/functional/test_runner.py -j20 --previous-releases --coverage --extended` ``` Uncovered RPC commands: - cleardiscouraged - debug - getblockheaders - getmerkleblocks - getpoolinfo - voteraw ``` ## Breaking Changes N/A ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone ACKs for top commit: PastaPastaPasta: utACK 3971613 Tree-SHA512: f2d93db9068a707f2b33dd841b14f266db226fc5e907f19a49cf7a856b840f0c2c1f521c462996888933bb0ed636c288db12b1d36978c124cb536ea1ab9f3892
2 parents 6cb8dcd + 3971613 commit fc11cd8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/functional/feature_governance.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ def have_trigger_for_height(self, sb_block_height):
9090
return count == len(self.nodes)
9191

9292
def run_test(self):
93+
governance_info = self.nodes[0].getgovernanceinfo()
94+
assert_equal(governance_info['governanceminquorum'], 1)
95+
assert_equal(governance_info['proposalfee'], 1)
96+
assert_equal(governance_info['superblockcycle'], 20)
97+
assert_equal(governance_info['superblockmaturitywindow'], 10)
98+
assert_equal(governance_info['lastsuperblock'], 120)
99+
assert_equal(governance_info['nextsuperblock'], governance_info['lastsuperblock'] + governance_info['superblockcycle'])
100+
assert_equal(governance_info['governancebudget'], 1000)
101+
93102
map_vote_outcomes = {
94103
0: "none",
95104
1: "yes",

0 commit comments

Comments
 (0)