Skip to content

Commit 47663e6

Browse files
committed
Test query protocol-state with updated values
See IntersectMBO/cardano-node#4102
1 parent 7abb4e3 commit 47663e6

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

cardano_node_tests/tests/test_protocol.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,22 @@
88

99
from cardano_node_tests.tests import common
1010
from cardano_node_tests.utils import helpers
11+
from cardano_node_tests.utils.versions import VERSIONS
1112

1213
LOGGER = logging.getLogger(__name__)
1314

1415

15-
PROTOCOL_STATE_KEYS = ("csLabNonce", "csProtocol", "csTickn")
16+
PROTOCOL_STATE_KEYS_ALONZO = ("chainDepState", "lastSlot")
17+
PROTOCOL_STATE_KEYS_ALONZO_DEP_STATE = ("csLabNonce", "csProtocol", "csTickn")
18+
PROTOCOL_STATE_KEYS = (
19+
"candidateNonce",
20+
"epochNonce",
21+
"evolvingNonce",
22+
"labNonce",
23+
"lastEpochBlockNonce",
24+
"lastSlot",
25+
"oCertCounters",
26+
)
1627
PROTOCOL_PARAM_KEYS = (
1728
"collateralPercentage",
1829
"costModels",
@@ -64,7 +75,14 @@ def test_protocol_state_keys(self, cluster: clusterlib.ClusterLib):
6475
if query_currently_broken:
6576
pytest.xfail("`query protocol-state` is currently broken - cardano-node issue #3883")
6677

67-
assert tuple(sorted(protocol_state)) == PROTOCOL_STATE_KEYS
78+
if VERSIONS.cluster_era == VERSIONS.ALONZO:
79+
assert tuple(sorted(protocol_state)) == PROTOCOL_STATE_KEYS_ALONZO
80+
assert (
81+
tuple(sorted(protocol_state["chainDepState"]))
82+
== PROTOCOL_STATE_KEYS_ALONZO_DEP_STATE
83+
)
84+
elif VERSIONS.cluster_era > VERSIONS.ALONZO:
85+
assert tuple(sorted(protocol_state)) == PROTOCOL_STATE_KEYS
6886

6987
@allure.link(helpers.get_vcs_link())
7088
@pytest.mark.xfail

0 commit comments

Comments
 (0)