Refactor test cases considering different genesisState of injected apps
- Dominant language
- Go
- Stars
- 164
- Forks
- 213
- Avg merge
- 3d 58m
- Merged PRs (30d)
- 12
Description
Some tests perform validation based on Evmd’s Genesis State.
For example, in [tests/integration/x/vm/test_iterate_contracts.go:L70](https://github.com/cosmos/evm/blob/6de21f764a5bd1ae4d26cbd1c641a589cd515beb/tests/integration/x/vm/test_iterate_contracts.go#L70), the test assumes that five preinstalled contracts are already deployed in the genesis state.
As a result, if a different app is injected and the test is executed, it will fail.
To inject external apps to cosmos/evm integration test, We should enhance description or modify test cases
1. Clearly document the app requirements and assumptions needed for the test in comments.
2. Modify the test setup so that the genesis state configured in evmd/app.go is explicitly initialized during the setup phase.
Contributor guide
Research direction
Start with tests/integration/x/vm/test_iterate_contracts.go around line 70 and inspect evmd/app.go for the genesis state assumptions. Review the integration test setup to determine whether the evmd genesis state is initialized or whether requirements need documenting in comments. Done means the tests no longer depend implicitly on five preinstalled contracts when an external app is injected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100