-
Notifications
You must be signed in to change notification settings - Fork 704
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
Refactor staking test modules into their own files #3235
Refactor staking test modules into their own files #3235
Conversation
User @vicenterocha, please sign the CLA here. |
e5aa211
to
9e6298e
Compare
1909fbd
to
a52bb67
Compare
@vicenterocha thanks for the PR! One quick comment, we try to avoid rewriting history/force push on intermediate commits on open PRs -- especially on PRs ready to review, which is not the case here but it's still better to not squash int commits in general. The commits will be squashed before merging so no problem with adding a bunch of commits to the PR. |
a768b43
to
137f983
Compare
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, thanks!
regarding the failing jobs, there was a recent fix to polkavm that should fix the build-runtimes-polkavm
job -- could you merge the most recent master into your branch?
@vicenterocha thanks for the contribution. Quick question, when I run these tests ( |
@Ank4n thanks for having a look. Running tests on this branch actually gives me 156, whereas on master it gives me 155. I've compare both runs and it seems like this is the the additional test: I can provide a full test output of both master and current branch. Not sure exactly how this test is defined though. |
Thanks for investigating it. The test was added couple of weeks ago. My guess is I ran the test with your branch that was not updated with master which is why I missed one. And vice-versa for you, your master might be outdated. |
@vicenterocha thanks a lot for helping with this work, we have a bunch of changes coming up related to the pallet-staking with the multi-block election work and I think it's better to refactor all the tests during that work. In any case, I can point you some other issues to help with if you want. Thanks :) |
This PR refactors substrate staking tests, as detailed in #3178.
The idea is to do this in 2 PRs. On this one:
tests.rs
into their own test file under a newtests/
foldertests.rs
intotests/mod.rs
Even we this changes the
tests/mod.rs
is still quiet big (6k LOC). Next PR should address it by extratingtests/mods.rs
into further submodules.