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

test: Added tests for DecCoins to increase code coverage #9752

Merged
merged 23 commits into from
Jul 26, 2021

Conversation

spoo-bar
Copy link
Contributor

@spoo-bar spoo-bar commented Jul 22, 2021

Description

Ref: #7031

Note/todo :

  1. Not sure if this line is reachable. The condition is already checked in this line. Therefore, 100% coverage for ParseDecCoin function likely not possible
  2. Clarification needed here
  3. Clarification needed here

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)

@codecov
Copy link

codecov bot commented Jul 22, 2021

Codecov Report

Merging #9752 (d991bc3) into master (adff7d8) will increase coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head d991bc3 differs from pull request most recent head 3a3b80a. Consider uploading reports for the commit 3a3b80a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9752      +/-   ##
==========================================
+ Coverage   63.46%   63.47%   +0.01%     
==========================================
  Files         563      563              
  Lines       37504    52726   +15222     
==========================================
+ Hits        23801    33468    +9667     
- Misses      11839    17358    +5519     
- Partials     1864     1900      +36     
Impacted Files Coverage Δ
client/flags/flags.go 21.05% <0.00%> (-1.17%) ⬇️
x/staking/migrations/v040/migrate.go 50.94% <0.00%> (-10.60%) ⬇️
x/genutil/genesis.go 40.00% <0.00%> (-10.00%) ⬇️
x/evidence/keeper/infraction.go 78.40% <0.00%> (-9.83%) ⬇️
client/keys/import.go 57.14% <0.00%> (-7.57%) ⬇️
store/cache/cache.go 79.62% <0.00%> (-7.47%) ⬇️
x/distribution/keeper/hooks.go 23.68% <0.00%> (-7.27%) ⬇️
x/slashing/keeper/unjail.go 41.17% <0.00%> (-6.83%) ⬇️
crypto/keyring/output.go 36.11% <0.00%> (-6.75%) ⬇️
types/codec.go 60.00% <0.00%> (-6.67%) ⬇️
... and 554 more

@alessio alessio self-requested a review July 22, 2021 15:30
@orijbot
Copy link

orijbot commented Jul 23, 2021

Visit https://dashboard.github.orijtech.com?pr=9752&repo=cosmos%2Fcosmos-sdk to see benchmark details.

container/option_test.go Outdated Show resolved Hide resolved
@spoo-bar spoo-bar marked this pull request as ready for review July 23, 2021 15:06
Co-authored-by: Alessio Treglia <[email protected]>
Copy link
Contributor

@cyberbono3 cyberbono3 left a comment

Choose a reason for hiding this comment

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

lgtm

@alexanderbez alexanderbez requested a review from alessio July 26, 2021 13:30
@alessio alessio added the A:automerge Automatically merge PR once all prerequisites pass. label Jul 26, 2021
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Welcome aboard @spoo-bar! Grab a drink and fasten your belt: it's going to be a fun ride.

@mergify mergify bot merged commit b34ceec into master Jul 26, 2021
@mergify mergify bot deleted the spoorthi/7031-deccoins-adding-tests branch July 26, 2021 20:51
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants