-
Notifications
You must be signed in to change notification settings - Fork 65
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
test: use non-deprecated gomock package & fix unit tests #88
Conversation
@@ -147,6 +147,7 @@ mocks: $(MOCKS_DIR) | |||
mockgen -package=mock -destination=./test/mock/bank_keeper.go $(GOMOD)/router/types BankKeeper | |||
mockgen -package=mock -destination=./test/mock/ics4_wrapper.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types ICS4Wrapper | |||
mockgen -package=mock -destination=./test/mock/ibc_module.go github.com/cosmos/ibc-go/v7/modules/core/05-port/types IBCModule | |||
mockgen -package=mock -destination=./test/mock/channel_keeper.go $(GOMOD)/router/types ChannelKeeper |
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.
Maybe add go install go.uber.org/mock/[email protected]
into the mocks
target, or a comment to use this for mockgen now.
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.
good idea, i'll add this now!
cc @jtieri this is actually approved now with me being added to the IBCApps team |
thanks! just getting back around to this, i'll add that line to the Makefile target for generating the mocks then get this merged. |
* test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/go.sum # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go
* test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go
* test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go
…ix unit tests (#115) * test: use non-deprecated gomock package & fix unit tests (#88) * test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go * fix backport v7 -> v6 * lint --------- Co-authored-by: Justin Tieri <[email protected]> Co-authored-by: Reece Williams <[email protected]>
…ix unit tests (#114) * test: use non-deprecated gomock package & fix unit tests (#88) * test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go * fix: backport v7 -> v5 --------- Co-authored-by: Justin Tieri <[email protected]> Co-authored-by: Reece Williams <[email protected]>
…ix unit tests (#113) * test: use non-deprecated gomock package & fix unit tests (#88) * test: use non-deprecated gomock package & fix unit tests * build: add go install cmd to the mocks target * test: fix failing test on empty packet payload (cherry picked from commit b1b6db8) # Conflicts: # middleware/packet-forward-middleware/Makefile # middleware/packet-forward-middleware/go.mod # middleware/packet-forward-middleware/go.sum # middleware/packet-forward-middleware/router/module_test.go # middleware/packet-forward-middleware/test/mock/channel_keeper.go # middleware/packet-forward-middleware/test/mock/ibc_module.go # middleware/packet-forward-middleware/test/mock/ics4_wrapper.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/test/setup.go * fix backport v7 -> v4 --------- Co-authored-by: Justin Tieri <[email protected]> Co-authored-by: Reece Williams <[email protected]>
the github.com/golang/mock package has been archived with the suggestion to use the forked version here. this pr replaces the now abandoned repo in favor of the maintained fork and regenerates the mocks.
d72e83c also introduced some breakage in the unit tests which i've fixed.