From 336486babe6239455ac37466fcc0773eeacfbcfe Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Wed, 20 Nov 2024 12:00:19 +0100 Subject: [PATCH] feat: add expected log message check in hardfork test Add expected log message check for protocol version in `TestHardfork`. This ensures that the correct protocol version is logged during the hardfork enactment process. --- cardano_node_tests/tests/tests_conway/test_hardfork.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cardano_node_tests/tests/tests_conway/test_hardfork.py b/cardano_node_tests/tests/tests_conway/test_hardfork.py index 37d6e6b98..ee657e44c 100644 --- a/cardano_node_tests/tests/tests_conway/test_hardfork.py +++ b/cardano_node_tests/tests/tests_conway/test_hardfork.py @@ -13,6 +13,7 @@ from cardano_node_tests.utils import clusterlib_utils from cardano_node_tests.utils import governance_utils from cardano_node_tests.utils import helpers +from cardano_node_tests.utils import logfiles from cardano_node_tests.utils.versions import VERSIONS LOGGER = logging.getLogger(__name__) @@ -231,7 +232,10 @@ def test_hardfork( ), "Incorrect major version" # Check enactment - enact_epoch = cluster.wait_for_epoch(epoch_no=init_epoch + 2, padding_seconds=5) + expected_msgs = [("pool1.stdout", r"ProtVer \{pvMajor = Version 10")] + with logfiles.expect_messages(expected_msgs): + enact_epoch = cluster.wait_for_epoch(epoch_no=init_epoch + 2, padding_seconds=15) + enact_gov_state = cluster.g_conway_governance.query.gov_state() conway_common.save_gov_state( gov_state=enact_gov_state, name_template=f"{temp_template}_enact_{enact_epoch}"