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

refactor: staking module using mocks #12827

Merged
merged 12 commits into from
Aug 28, 2022
Merged

refactor: staking module using mocks #12827

merged 12 commits into from
Aug 28, 2022

Conversation

cool-develope
Copy link
Contributor

Description

Closes: #12504


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
  • added ! to 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
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • 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.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@cool-develope cool-develope requested a review from a team as a code owner August 4, 2022 19:16
@cool-develope cool-develope marked this pull request as draft August 4, 2022 19:16
@cool-develope cool-develope changed the title John/12504 mock staking refactor: bank module using mocks Aug 4, 2022
@julienrbrt julienrbrt changed the title refactor: bank module using mocks refactor: staking module using mocks Aug 4, 2022
@kocubinski kocubinski self-assigned this Aug 15, 2022
@cool-develope cool-develope marked this pull request as ready for review August 23, 2022 13:30
@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #12827 (f1a2e0a) into main (d11196a) will decrease coverage by 1.52%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12827      +/-   ##
==========================================
- Coverage   55.62%   54.09%   -1.53%     
==========================================
  Files         644      644              
  Lines       54956    54956              
==========================================
- Hits        30567    29728     -839     
- Misses      21917    22868     +951     
+ Partials     2472     2360     -112     
Impacted Files Coverage Δ
x/staking/keeper/pool.go 10.25% <0.00%> (-76.93%) ⬇️
x/staking/keeper/slash.go 11.89% <0.00%> (-69.19%) ⬇️
x/staking/keeper/invariants.go 0.00% <0.00%> (-64.29%) ⬇️
x/staking/keeper/grpc_query.go 1.74% <0.00%> (-60.05%) ⬇️
x/staking/keeper/genesis.go 0.00% <0.00%> (-53.39%) ⬇️
x/staking/keeper/migrations.go 0.00% <0.00%> (-45.46%) ⬇️
x/staking/keeper/alias_functions.go 0.00% <0.00%> (-45.17%) ⬇️
x/staking/keeper/hooks.go 28.00% <0.00%> (-40.00%) ⬇️
x/staking/keeper/msg_server.go 3.06% <0.00%> (-15.57%) ⬇️
x/staking/keeper/delegation.go 63.06% <0.00%> (-11.68%) ⬇️
... and 5 more

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.

lgtm!

@julienrbrt
Copy link
Member

We should really look at codedov, these coverages check are deceptive.

@julienrbrt julienrbrt added the A:automerge Automatically merge PR once all prerequisites pass. label Aug 28, 2022
@mergify mergify bot merged commit bc274d8 into main Aug 28, 2022
@mergify mergify bot deleted the john/12504-mock-staking branch August 28, 2022 14:02
Wryhder pushed a commit to Wryhder/cosmos-sdk that referenced this pull request Oct 26, 2022
## Description

Closes: cosmos#12504 


---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] 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.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/staking Type: Build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rewrite staking tests to use mocks
4 participants