Skip to content

Refactor staking test modules into own files #3178

@gpestana

Description

@gpestana

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

Metadata

Metadata

Assignees

Labels

C1-mentorA task where a mentor is available. Please indicate in the issue who the mentor could be.D0-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder.T1-FRAMEThis PR/Issue is related to core FRAME, the framework.T10-testsThis PR/Issue is related to tests.

Type

No type

Projects

Status

✂️ In progress.

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions