Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, the InitGenesis function did not have complete unit coverage, did not check for panic values, and shared a test suite with the handler. This created dependencies on setup for unrelated tests and made it difficult to add, change, or refactor genesis behavior with confidence. These changes use a fixture based approach to testing InitGenesis which improves the ability to define more complex test cases and run each sub test in isolation. Once global state is removed from app setup, this enables an easier transition to parallel tests. This comes from the ability to setup the application, define a function for each test that is provided a context and app, then generates a fixture with required dependencies and expectations. This allows context to be shared across state setup, expectations, and panic values. In addition, all InitGenesis behavior was checked in TDD fashion and tests were added where coverage was lacking before.
- Loading branch information