-
Notifications
You must be signed in to change notification settings - Fork 368
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
Tests Refactor v1: remove mock #273
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rhuairahrighairidh
added
R4R
When a PR is ready for review
and removed
WIP
PR is a work in progress and not ready for review
labels
Dec 7, 2019
karzak
approved these changes
Dec 10, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note. The use of package_test
and explicit importing of public methods on package
in tests is good hygiene, but I don't think we need to strictly follow that pattern in cases where we just want simple unit tests (including unit tests of private functions).
denalimarsh
pushed a commit
that referenced
this pull request
Apr 3, 2020
Tests Refactor v1: remove mock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the tests to the almost-latest sdk testing style (cosmos/cosmos-sdk#4875).
Main aim was to remove mock to help with the move to module accounts (mock doesn't have a supply keeper).
Leaving update to using TestSuites (cosmos/cosmos-sdk#5257) to a future refactor.
Main changes:
TestApp
(a wrapper around the main app) rather than setting up all the keepers they need in a test_common.go.TODOs for future refactors:
app_test.go
style tests, they test things covered by keeper, handler, and cli testsTestApp
and helper funcs to a new package to split out ofapp/
Progress: