Skip to content

Commit

Permalink
Merge pull request #2444 from cardanoapi/extra-conway-tests
Browse files Browse the repository at this point in the history
Addition of Conway Tests related to delegation changes, drep multiple registration, deposit returns.
  • Loading branch information
mkoura authored Jul 11, 2024
2 parents e3deea4 + ab2c117 commit 4b2c0e9
Show file tree
Hide file tree
Showing 5 changed files with 524 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cardano_node_tests/tests/reqs_conway.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ def __r(id: str) -> requirements.Req:
cip082 = __r("CIP082")
cip083 = __r("CIP083")

cip085 = __r("CIP085")
cip086 = __r("CIP086")
cip087 = __r("CIP087")
cip088 = __r("CIP088")
cip089 = __r("CIP089")
cip090 = __r("CIP090")

# https://github.com/IntersectMBO/cardano-test-plans/blob/main/docs/user-stories/02-cardano-cli.md
cli001 = __r("CLI001")
cli002 = __r("CLI002")
Expand Down
17 changes: 17 additions & 0 deletions cardano_node_tests/tests/tests_conway/test_committee.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def test_add_rm_committee_members( # noqa: C901
- check that it's not possible to vote on enacted action
* check output of votes and action `view` commands
* check deposit is returned to user reward account after enactment
"""
# pylint: disable=too-many-locals,too-many-statements,too-many-branches
cluster, governance_data = cluster_lock_governance
Expand All @@ -394,6 +395,10 @@ def test_add_rm_committee_members( # noqa: C901
if conway_common.is_in_bootstrap(cluster_obj=cluster):
pytest.skip("Cannot run during bootstrap period.")

init_return_account_balance = cluster.g_query.get_stake_addr_info(
pool_user_lg.stake.address
).reward_account_balance

deposit_amt = cluster.conway_genesis["govActionDeposit"]

# Check if total delegated stake is below the threshold. This can be used to check that
Expand Down Expand Up @@ -984,6 +989,18 @@ def _check_rem_state(gov_state: tp.Dict[str, tp.Any]):
governance_utils.check_vote_view(cluster_obj=cluster, vote_data=voted_votes_rem.spo[0])
reqc.cip067.success()

reqc.cip034en.start(url=helpers.get_vcs_link())
enact_deposit_returned = cluster.g_query.get_stake_addr_info(
pool_user_lg.stake.address
).reward_account_balance

assert (
enact_deposit_returned
== init_return_account_balance
+ deposit_amt * 2 # 2 * deposit_amt for add and rem actions
), "Incorrect return account balance"
reqc.cip034en.success()

if xfail_ledger_4001_msgs:
ledger_4001 = issues.ledger_4001.copy()
ledger_4001.message = "; ".join(xfail_ledger_4001_msgs)
Expand Down
Loading

0 comments on commit 4b2c0e9

Please sign in to comment.