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

Investigate how to remove baseapp from module tests. #22903

Open
20 tasks
julienrbrt opened this issue Dec 16, 2024 · 0 comments
Open
20 tasks

Investigate how to remove baseapp from module tests. #22903

julienrbrt opened this issue Dec 16, 2024 · 0 comments
Assignees

Comments

@julienrbrt
Copy link
Member

julienrbrt commented Dec 16, 2024

After v2, baseapp & co won't be needed and those legacy part are being deleted from main.
However, to complete the baseapp removal, we need to remove the usage of baseapp from modules (x/) tests.

Proposal

From v0.52 and v2 modules should only use cosmossdk.io/core and we've created a minimal dependency cosmossdk.io/core/testing package for testing.

We should extend cosmossdk.io/core/testing with mock services and possibly more, in order to replace all baseapp and sdk.Context usage in module tests.

Requirements

It is very important to NOT import server/v2 packages (including stf and appmanager) and runtime/v2 packages in modules.
When the whole system needs to be tested, the integration/v2, simulations and systemtests frameworks can be used.
This should only be focusing in unit testing, which is why only core/testing should be required.

Note: it is possible that a test under x/ is more of an integration test than an unit test. If it is the case, move it and rewrite it accordingly.

Work breakdown

Once the framework is ready (+1 PoC module), migrate one module per PR.

  • x/accounts
  • x/auth
  • x/authz
  • x/bank
  • x/circuit
  • x/consensus
  • x/distribution
  • x/evidence
  • x/feegrant
  • x/gov
  • x/group
  • x/mint
  • x/nft
  • x/params
  • x/protocolpool
  • x/slashing
  • x/staking
  • x/tx
  • x/upgrade
  • x/epochs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants