Closed elprogramadorgt closed 4 weeks ago
[!CAUTION]
Review failed
The pull request is closed.
This pull request updates the mocking library used throughout the codebase from github.com/golang/mock
to go.uber.org/mock
. The changes involve modifying import statements across multiple test files and updating the Makefile
to install the new mocking tool. Additionally, the go.mod
file is updated to reflect the new dependency and version changes for several packages. The overall structure and logic of the tests remain unchanged, ensuring that functionality is preserved while transitioning to a maintained library.
File Path | Change Summary |
---|---|
Makefile | Updated mock target to install go.uber.org/mock@v0.5.0 instead of github.com/golang/mock/mockgen@v1.6.0 . |
go.mod | Added new dependency go.uber.org/mock v0.5.0 ; updated versions for golang.org/x/mod and golang.org/x/tools ; modified replacements for several packages. |
x/logic/fs/composite/fs_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/fs/filtered/fs_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/fs/wasm/fs_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/keeper/features_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/keeper/grpc_query_ask_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/keeper/grpc_query_params_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/keeper/msg_server_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/meter/weighted_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/predicate/bank_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/predicate/builtin_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/predicate/util_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/expected_keepers_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/fs_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/gas_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/interface_registry_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/keeper_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/logic/testutil/read_file_fs_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/mint/keeper/genesis_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/mint/keeper/grpc_query_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/mint/keeper/keeper_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/mint/testutil/expected_keepers_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/vesting/msg_server_test.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/vesting/testutil/expected_keepers_mocks.go | Updated import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
golang/mock
to go.uber.org/mock
, which is directly addressed by the changes in this PR.Makefile
related to the mock generation tool, which is directly connected to the changes in this PR.Makefile
and other configuration files, relating to the overall project structure and dependency management, including the mocking framework updates in this PR.🐰 In fields of code where bunnies hop,
We've switched our mocks, we won't stop!
From golang's past to Uber's grace,
Our tests now run at a faster pace!
With every change, our spirits soar,
Hopping high, we code and explore! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Switch mocking library from golang/mock to go.uber.org/mock
Summary by CodeRabbit
New Features
github.com/golang/mock
togo.uber.org/mock
across various test files and mock implementations.Bug Fixes
Chores
go.mod
for improved compatibility and functionality.