Skip to content

Commit

Permalink
Merge pull request #2230 from IntersectMBO/check_err_with_cc
Browse files Browse the repository at this point in the history
Check the error only when CC is present
  • Loading branch information
mkoura authored Feb 13, 2024
2 parents a46d6b7 + 6beffe8 commit de04d34
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cardano_node_tests/tests/tests_conway/test_committee.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,16 +842,17 @@ def _check_add_state(state: dict):
)

# Check that CC cannot vote on "update committee" action
with pytest.raises(clusterlib.CLIError) as excinfo:
_cast_vote(
approve=True,
vote_id="rem_with_ccs",
add_cc_votes=True,
action_txid=action_rem_txid,
action_ix=action_rem_ix,
)
err_str = str(excinfo.value)
assert "CommitteeVoter" in err_str, err_str
if governance_data.cc_members:
with pytest.raises(clusterlib.CLIError) as excinfo:
_cast_vote(
approve=True,
vote_id="rem_with_ccs",
add_cc_votes=True,
action_txid=action_rem_txid,
action_ix=action_rem_ix,
)
err_str = str(excinfo.value)
assert "CommitteeVoter" in err_str, err_str

def _check_rem_state(state: dict):
cc_member_val = state["committee"]["members"].get(cc_member2_key)
Expand Down

0 comments on commit de04d34

Please sign in to comment.