Skip to content
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 own files #3178

Open
4 tasks
gpestana opened this issue Feb 1, 2024 · 2 comments
Open
4 tasks

Refactor staking test modules into own files #3178

gpestana opened this issue Feb 1, 2024 · 2 comments
Assignees
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework. T10-tests This PR/Issue is related to tests.

Comments

@gpestana
Copy link
Contributor

gpestana commented Feb 1, 2024

The staking tests.rs has about 7k LOC. Most of the tests are nicely organised into modules, consider refactor each mod into a new file for readability.

It may be that the module-less tests alone will be lot of LOC, maybe we should consider breaking those down as well on a separate PR. My suggestion on how to proceed are the following:

First iter/PR:

  • Open PR refactoring the current tests into it's own mod folder /staking/src/tests/
  • Refactor mod tests into their own file. e.g. tests under mod staking_ledger should be in /staking/src/tests/staking_ledger.rs
  • Tests without module should end up in /staking/src/tests/mod.rs

Second iter/PR:

  • consider re-org tests in mod.rs into relevant submodules
@gpestana gpestana added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. T1-FRAME This PR/Issue is related to core FRAME, the framework. T10-tests This PR/Issue is related to tests. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Feb 1, 2024
@gpestana
Copy link
Contributor Author

gpestana commented Feb 6, 2024

ftr, @vicenterocha is interested in picking up this issue 🚀

@vicenterocha
Copy link

Yes I'll take this one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T1-FRAME This PR/Issue is related to core FRAME, the framework. T10-tests This PR/Issue is related to tests.
Projects
Status: ✂️ In progress.
Development

No branches or pull requests

2 participants