Closed AnkushinDaniil closed 1 month ago
@natebeauregard
The changes involve modifications to the Makefile
and several Go files within the x/rollup
package. The install-mockgen
target in the Makefile
was updated to install the mockgen
tool from a new source. The gen-mocks
target was changed to use go generate ./...
, allowing broader mock generation. Import paths for the gomock
package were changed from github.com/golang/mock/gomock
to go.uber.org/mock/gomock
. Additionally, the mock implementations in expected_keepers_mocks.go
were updated for consistency in parameter naming.
File(s) | Change Summary |
---|---|
Makefile | Updated install-mockgen to install mockgen from go.uber.org/mock/mockgen@v0.4.0 ; modified gen-mocks to use go generate ./... . |
x/rollup/keeper/keeper_test.go | Changed import from github.com/golang/mock/gomock to go.uber.org/mock/gomock . |
x/rollup/testutil/expected_keepers_mocks.go | Updated function signatures for consistency in parameter naming; changed import path for gomock . |
go.mod | Added dependency on go.uber.org/mock v0.4.0 and removed indirect dependency on go.uber.org/mock v0.3.0 . |
sequenceDiagram
participant Developer
participant Makefile
participant GoGenerate
participant MockGenerator
Developer->>Makefile: Run `make gen-mocks`
Makefile->>GoGenerate: Execute `go generate ./...`
GoGenerate->>MockGenerator: Generate mocks for all relevant files
MockGenerator-->>GoGenerate: Mocks generated successfully
GoGenerate-->>Makefile: Generation complete
Makefile-->>Developer: Mocks are ready for use
In the meadow where code does play,
A rabbit hops, hip-hip-hooray!
Mocks are now easier, oh what a sight,
With names so clear, they bring delight!
Fromgomock
touber
, a leap we take,
Generating joy, for testing's sake! 🐇✨
go.mod (1)
`35-35`: **Upgraded `go.uber.org/mock` to v0.4.0 and made it a direct dependency.** This change upgrades the `go.uber.org/mock` library from v0.3.0 to v0.4.0 and makes it a direct dependency. Please verify that the existing mock implementations and usages are compatible with the new version, as there might be breaking changes between v0.3.0 and v0.4.0. Making the dependency direct is a good practice to ensure control over the exact version used.
This pull request updates gomock from the unmaintained repo to the maintained fork.
Summary by CodeRabbit
New Features
BankKeeper
interface.Bug Fixes
Refactor