Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

runtime integration test don't initialize pallets #2703

Open
slumber opened this issue Jun 7, 2023 · 3 comments
Open

runtime integration test don't initialize pallets #2703

slumber opened this issue Jun 7, 2023 · 3 comments
Labels
I5-tests Tests need fixing, improving or augmenting.

Comments

@slumber
Copy link
Contributor

slumber commented Jun 7, 2023

Tests in question are parachains/integration-tests. @rphmeier suggested the issue is related to

// Parachain Implementation
#[macro_export]
macro_rules! decl_test_parachains {
(

For instance, explicit panic in aura-ext pallet on initialization isn't triggered.
Related to #2658

@slumber slumber added the I5-tests Tests need fixing, improving or augmenting. label Jun 7, 2023
@slumber
Copy link
Contributor Author

slumber commented Jun 7, 2023

cc @muharem

@rphmeier
Copy link
Contributor

rphmeier commented Jun 7, 2023

The issue we were observing was that with the new logic from #2658, #2501, #2551 , that integration tests for all runtimes began to fail when integrating the new Aura hook, and the root cause of this failure was that AuraExt wasn't initialized before set_validation_data was called.

The change in behavior from these PRs is that ParachainSystem::set_validation_data can now require some other pallets to initialized properly (i.e. when calling the configured ConsensusHook).

I see that the logic in decl_test_parachains is directly invoking on_initialize and set_validation_data, so I see two solutions going forward:

  • Add AuraExt to the pallets_extra field for the macro for each runtime and ensure it is initialized
  • Alter the macro to initialize all pallets

@bkchr
Copy link
Member

bkchr commented Jun 7, 2023

  • Alter the macro to initialize all pallets

If that isn't done currently, it sounds like the tests are not being setup correctly.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
I5-tests Tests need fixing, improving or augmenting.
Projects
None yet
Development

No branches or pull requests

3 participants