Skip to content
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

build(all): migrate to go.uber.org/mock #22315

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

islishude
Copy link
Contributor

@islishude islishude commented Oct 19, 2024

Description

#22313


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

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.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

@julienrbrt
Copy link
Member

julienrbrt commented Oct 19, 2024

Same comment as here: #22314 (comment) about mockgen.sh. Is this the result of make mocks?

@islishude islishude changed the title build(all): migrate to go.uber.org/mock/mockgen build(all): migrate to go.uber.org/mock Oct 20, 2024
"github.com/stretchr/testify/require"
"github.com/golang/mock/gomock"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It requires the updates of core/testing module.

So the golang/mock is retained here

@islishude islishude marked this pull request as ready for review October 20, 2024 13:25
@islishude islishude force-pushed the build-all-uber-mock branch from 4f2f1f9 to 1756a3d Compare October 20, 2024 13:47
@islishude
Copy link
Contributor Author

I can't replicate the ci error on my side

cd x/gov
  go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
        cosmossdk.io/x/gov              coverage: 0.0% of statements
        cosmossdk.io/x/gov/client               coverage: 0.0% of statements
        cosmossdk.io/x/gov/client/testutil              coverage: 0.0% of statements
        cosmossdk.io/x/gov/testutil             coverage: 0.0% of statements
        cosmossdk.io/x/gov/types                coverage: 0.0% of statements
ok      cosmossdk.io/x/gov/client/cli   0.472s  coverage: 52.9% of statements
ok      cosmossdk.io/x/gov/client/utils 1.631s  coverage: 75.0% of statements
ok      cosmossdk.io/x/gov/keeper       1.266s  coverage: 75.7% of statements
ok      cosmossdk.io/x/gov/migrations/v3        0.781s  coverage: 96.1% of statements
ok      cosmossdk.io/x/gov/migrations/v5        2.707s  coverage: 79.2% of statements
ok      cosmossdk.io/x/gov/migrations/v6        3.075s  coverage: 62.5% of statements
ok      cosmossdk.io/x/gov/simulation   1.935s  coverage: 26.9% of statements
ok      cosmossdk.io/x/gov/types/v1     3.422s  coverage: 3.6% of statements
ok      cosmossdk.io/x/gov/types/v1beta1        2.278s  coverage: 3.0% of statements

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@julienrbrt julienrbrt added this pull request to the merge queue Oct 21, 2024
Merged via the queue into cosmos:main with commit fc91e76 Oct 21, 2024
70 of 72 checks passed
@julienrbrt
Copy link
Member

@Mergifyio backport release/v0.52.x

Copy link
Contributor

mergify bot commented Oct 21, 2024

backport release/v0.52.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 21, 2024
(cherry picked from commit fc91e76)

# Conflicts:
#	baseapp/abci_test.go
#	client/v2/go.mod
#	client/v2/go.sum
#	core/testing/gas/service_mocks.go
#	core/testing/go.mod
#	core/testing/go.sum
#	go.mod
#	go.sum
#	orm/go.mod
#	orm/go.sum
#	orm/model/ormdb/module_test.go
#	orm/testing/ormmocks/hooks.go
#	orm/testing/ormmocks/match.go
#	server/v2/cometbft/go.mod
#	server/v2/cometbft/go.sum
#	simapp/go.mod
#	simapp/go.sum
#	simapp/v2/go.mod
#	simapp/v2/go.sum
#	tests/go.mod
#	tests/go.sum
#	tools/confix/go.mod
#	tools/confix/go.sum
#	x/accounts/defaults/base/go.mod
#	x/accounts/defaults/base/go.sum
#	x/accounts/defaults/lockup/go.sum
#	x/accounts/defaults/multisig/go.mod
#	x/accounts/defaults/multisig/go.sum
#	x/accounts/go.mod
#	x/accounts/go.sum
#	x/authz/go.mod
#	x/authz/go.sum
#	x/bank/go.mod
#	x/bank/go.sum
#	x/bank/v2/testutil/expected_keepers_mocks.go
#	x/circuit/go.mod
#	x/circuit/go.sum
#	x/consensus/go.mod
#	x/consensus/go.sum
#	x/distribution/go.mod
#	x/distribution/go.sum
#	x/epochs/go.mod
#	x/epochs/go.sum
#	x/evidence/go.mod
#	x/evidence/go.sum
#	x/feegrant/go.mod
#	x/feegrant/go.sum
#	x/gov/go.mod
#	x/gov/go.sum
#	x/group/go.mod
#	x/group/go.sum
#	x/mint/go.mod
#	x/mint/go.sum
#	x/nft/go.mod
#	x/nft/go.sum
#	x/params/go.mod
#	x/params/go.sum
#	x/protocolpool/go.mod
#	x/protocolpool/go.sum
#	x/slashing/go.mod
#	x/slashing/go.sum
#	x/staking/go.mod
#	x/staking/go.sum
#	x/upgrade/go.mod
#	x/upgrade/go.sum
@islishude islishude deleted the build-all-uber-mock branch October 21, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants