[go: up one dir, main page]

Tezt: Add agnostic baker scenarios for protocol migration

What

Closes #7761 (closed).

Parent MR: !16833 (merged)

For voting.ml and dal.ml, there are tests which use two processes for migration scenarios, in those cases, I replaced the two processes with the agnostic baker process, as I do not believe the tests should be duplicated. (no trivial refactoring either)

However, for the tests in protocol_migration.ml, I did the following things:

  • for the test involving only 1 protocol-specific baker for each node, I replaced that one with the agnostic baker (test_forked_migration_manual)

  • for the test involving 1 node, but with two protocol-specific bakers, I added an argument use_agnostic_baker and therefore duplicated the test (the refactoring was not hard) (test_migration_with_bakers)

  • for the test involving 3 nodes, the refactoring is complicated, and ultimately when the Baker module is removed, it would be harder to adapt. Therefore, I instead went for adding more scenarios:

    • (already existing scenario) : 2 bakers per node (one for each protocol) (test_forked_migration_bakers)
    • New scenario : 1 agnostic baker per node (test_forked_migration_agnostic_bakers)
    • New scenario : 2 bakers for the first node (one for each protocol) and 1 agnostic baker for the remaining to nodes (test_forked_migration_all_bakers)

Why

To showcase that the agnostic baker behaves correctly in a network of multiple entities (either protocol-specific or other agnostic bakers).

How

Manually testing the MR

CI green +

dune exec tezt/tests/main.exe -- --file voting.ml

dune exec tezt/tests/main.exe -- --file dal.ml

dune exec tezt/tests/main.exe -- --file protocol_migration.ml

More specifically, to test the new scenarios for protocol_migration, do:

dune exec tezt/tests/main.exe -- --file protocol_migration.ml --verbose --title 'manually forked migration blocks from r022 to alpha'

dune exec tezt/tests/main.exe -- --file protocol_migration.ml --verbose --title 'chain progress/attestation of migration block from r022 to alpha with agnostic_baker daemon(s)'

dune exec tezt/tests/main.exe -- --file protocol_migration.ml --verbose --title 'baker forked migration blocks from r022 to alpha'

dune exec tezt/tests/main.exe -- --file protocol_migration.ml --verbose --title 'agnostic baker forked migration blocks from r022 to alpha'

dune exec tezt/tests/main.exe -- --file protocol_migration.ml --verbose --title 'baker and agnostic baker forked migration blocks from r022 to alpha'

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Gabriel Moise

Merge request reports

Loading