Moonsong-Labs / moonwall

Testing Framework for Substrate networks
https://moonsong-labs.github.io/moonwall/
GNU General Public License v3.0
10 stars 4 forks source link

Moonwall derive doesn't produce IDs like moonbeam expected #409

Closed dr-manhattan-1987 closed 3 months ago

dr-manhattan-1987 commented 4 months ago

Here's the example run:

❯ pnpm moonwall derive suites
🟢 Processing suites ...
? This will rename 12 suites IDs in suites, continue? Yes
🟢 Changing suite test-balance to use prefix (T) .... Done ✅
🟢 Changing suite test-block to use prefix (TB) .... Done ✅
🟢 Changing suite test-contract to use prefix (TC) .... Done ✅

It maybe helpful if we can configure prefix?

timbrinded commented 4 months ago

What do you have in mind? open to suggestions.

dr-manhattan-1987 commented 4 months ago

What if we have a serializer that assigns ID according to depth and index just like moonbeam Ex:

      suites -> dave (D01) -> test-block (01) -> test-block-1.ts (01)
      suites -> dev (D02) -> test-balance (01) -> test-balance-1.ts (01)
      suites -> zombie (D03) -> test-something (01) -> test-something-5.ts (05)

The serializer will serialize the ID from the sorted directory/file tree. This can give us result more close to how moonbeam is keeping.

Some of the configuration parameters we can provide is how many digits to use for a single depth (default may be 2 but can also be configured for 1,3,4, etc Ex: with 1

 suites -> dave (D1) -> test-block (1) -> test-block-1.ts (1)
timbrinded commented 3 months ago

Impl in https://github.com/Moonsong-Labs/moonwall/pull/412