-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration tests setup #947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love this!
tests/integration/src/setup.rs
Outdated
DappsStaking::on_finalize(System::block_number()); | ||
System::set_block_number(System::block_number() + 1); | ||
DappsStaking::on_initialize(System::block_number()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we run the hooks for all pallets?
AFAIK, they cannot be just fetched and iterated over, while being able to call hooks on them (hope I'm wrong though!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a problem. I was originally thinking to add them as needed. After some second thoughts, I agree with you, will do so that we don't need to worry about adding more pallets overtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Now that I rethink what I wrote, there has to be a way to do it since it's done when network is live 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. I checked all pallets manually and added hooks if there are defined. ParachainSystem
was skipped as it requires extra mocks but not required for tests. The pallets could be iterated via some tricky way, like macro or the runtime enum definition, but IMO it would be a bit overkill and edge cases would make more complicated.
mod setup; | ||
|
||
#[cfg(any(feature = "shibuya", feature = "shiden"))] | ||
mod proxy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add astar
as well after we merge pallet-proxy-astar PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
Pull Request Summary
Set up integration tests. Moved current
pallet-proxy
tests into integration tests.Check list