Skip to content

Commit

Permalink
feat: add expected log message check in hardfork test
Browse files Browse the repository at this point in the history
Add expected log message check for protocol version in `TestHardfork`.

This ensures that the correct protocol version is logged during the
hardfork enactment process.
  • Loading branch information
mkoura committed Nov 20, 2024
1 parent 9da8721 commit 336486b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cardano_node_tests/tests/tests_conway/test_hardfork.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 336486b

Please sign in to comment.