Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SetupConfig function for Unit Tests (#519)
Closes: #XXX ## Context and purpose of the change When working with addresses in unit tests, we need to update the sdk config to have a stride address prefix. The function to set these config settings was already in our test utils, but it was limited to our keeper test framework. This PR makes the setup function public so it can be leveraged by non-keeper tests. ## Brief Changelog * Moved config settings out of `init` and into a `SetupConfig` function * Added config function to apptesting so it's easily importable * Added function to generate test addresses ## Usage ```go import "github.com/Stride-Labs/stride/v4/app/apptesting" apptesting.SetupConfig() validAddr, invalidAddr := apptesting.GenerateTestAddrs() ``` ## Author's Checklist I have... - [ ] Run and PASSED locally all GAIA integration tests - [ ] If the change is contentful, I either: - [ ] Added a new unit test OR - [ ] Added test cases to existing unit tests - [ ] OR this change is a trivial rework / code cleanup without any test coverage If skipped any of the tests above, explain. ## Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] manually tested (if applicable) - [ ] confirmed the author wrote unit tests for new logic - [ ] reviewed documentation exists and is accurate ## Documentation and Release Note - [ ] Does this pull request introduce a new feature or user-facing behavior changes? - [ ] Is a relevant changelog entry added to the `Unreleased` section in `CHANGELOG.md`? - [ ] This pull request updates existing proto field values (and require a backend and frontend migration)? - [ ] Does this pull request change existing proto field names (and require a frontend migration)? How is the feature or change documented? - [ ] not applicable - [ ] jira ticket `XXX` - [ ] specification (`x/<module>/spec/`) - [ ] README.md - [ ] not documented
- Loading branch information