From f3cf774f525d268ef4beb70dd97aa72a9095c808 Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Wed, 29 Oct 2025 20:47:07 +0100 Subject: [PATCH] test(conway): add checks for future pparams query --- .../tests/tests_conway/test_pparam_update.py | 7 ++++++- cardano_node_tests/utils/clusterlib_utils.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cardano_node_tests/tests/tests_conway/test_pparam_update.py b/cardano_node_tests/tests/tests_conway/test_pparam_update.py index 2ad5dfeab..168025867 100644 --- a/cardano_node_tests/tests/tests_conway/test_pparam_update.py +++ b/cardano_node_tests/tests/tests_conway/test_pparam_update.py @@ -1145,6 +1145,8 @@ def _check_proposed_pparams( ) fin_approve_epoch = cluster.g_query.get_epoch() + assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty" + # db-sync check [r.start(url=_url) for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)] try: @@ -1194,7 +1196,7 @@ def _check_proposed_pparams( ) def _check_state(state: dict): - pparams = state.get("curPParams") or state.get("currentPParams") or {} + pparams = state.get("curPParams") or state.get("currentPParams") or state or {} clusterlib_utils.check_updated_params( update_proposals=fin_update_proposals, protocol_params=pparams ) @@ -1228,6 +1230,7 @@ def _check_state(state: dict): next_rat_state = rat_gov_state["nextRatifyState"] _check_state(next_rat_state["nextEnactState"]) + _check_state(cluster.g_query.get_future_pparams()) reqc.cip038_04.start(url=helpers.get_vcs_link()) assert not next_rat_state["ratificationDelayed"], "Ratification is delayed unexpectedly" reqc.cip038_04.success() @@ -1282,6 +1285,8 @@ def _check_state(state: dict): if is_spo_total_below_threshold: reqc.cip064_04.success() + assert not cluster.g_query.get_future_pparams(), "Future pparams should be empty" + # db-sync check try: reqc.db024.start(url=helpers.get_vcs_link()) diff --git a/cardano_node_tests/utils/clusterlib_utils.py b/cardano_node_tests/utils/clusterlib_utils.py index db84bd27e..e446835a9 100644 --- a/cardano_node_tests/utils/clusterlib_utils.py +++ b/cardano_node_tests/utils/clusterlib_utils.py @@ -642,6 +642,10 @@ def _get_param(key: str) -> tp.Any: def check_updated_params(*, update_proposals: list[UpdateProposal], protocol_params: dict) -> None: """Compare update proposals with actual protocol parameters.""" + if not protocol_params: + msg = "Protocol parameters dictionary is empty!" + raise ValueError(msg) + failures = [] for u in update_proposals: if u.check_func: