Skip to content

Commit c355ecf

Browse files
committed
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.
1 parent 32ee6c3 commit c355ecf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cardano_node_tests/tests/tests_conway/test_hardfork.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from cardano_node_tests.utils import clusterlib_utils
1414
from cardano_node_tests.utils import governance_utils
1515
from cardano_node_tests.utils import helpers
16+
from cardano_node_tests.utils import logfiles
1617
from cardano_node_tests.utils.versions import VERSIONS
1718

1819
LOGGER = logging.getLogger(__name__)
@@ -231,7 +232,10 @@ def test_hardfork(
231232
), "Incorrect major version"
232233

233234
# Check enactment
234-
enact_epoch = cluster.wait_for_epoch(epoch_no=init_epoch + 2, padding_seconds=5)
235+
expected_msgs = [("pool1.stdout", r"ProtVer \{pvMajor = Version 10")]
236+
with logfiles.expect_messages(expected_msgs):
237+
enact_epoch = cluster.wait_for_epoch(epoch_no=init_epoch + 2, padding_seconds=15)
238+
235239
enact_gov_state = cluster.g_conway_governance.query.gov_state()
236240
conway_common.save_gov_state(
237241
gov_state=enact_gov_state, name_template=f"{temp_template}_enact_{enact_epoch}"

0 commit comments

Comments
 (0)