Finschia / finschia-sdk

A framework for building blockchains based Finschia Mainnet that is forked from cosmos-sdk
Apache License 2.0
61 stars 31 forks source link

test: Add CLI, gRPC, MsgServer tests (backport #1405) #1430

Closed mergify[bot] closed 5 months ago

mergify[bot] commented 5 months ago

Description

closes: #XXXX

Test coverage reached over 80%

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

mergify[bot] commented 5 months ago

Cherry-pick of 97219d5ee0ebca0d324561b1a782938a97ce5eae has failed:

On branch mergify/bp/release/v0.49.x/pr-1405
Your branch is up to date with 'origin/release/v0.49.x'.

You are currently cherry-picking commit 97219d5ee.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
    new file:   client/tendermint.go
    modified:   init_node.sh
    new file:   testutil/cli/tm_mocks.go
    new file:   types/module/testutil/codec.go
    modified:   x/fbridge/client/cli/query.go
    new file:   x/fbridge/client/cli/query_test.go
    modified:   x/fbridge/client/cli/tx.go
    new file:   x/fbridge/client/cli/tx_test.go
    new file:   x/fbridge/keeper/abci_test.go
    modified:   x/fbridge/keeper/auth.go
    modified:   x/fbridge/keeper/auth_test.go
    new file:   x/fbridge/keeper/genesis_test.go
    new file:   x/fbridge/keeper/grpc_query_test.go
    new file:   x/fbridge/keeper/msg_server_test.go
    new file:   x/fbridge/types/fbridge_test.go
    new file:   x/fbridge/types/keys_test.go
    modified:   x/fbridge/types/params_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
    both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 13.72549% with 44 lines in your changes missing coverage. Please review.

Project coverage is 69.68%. Comparing base (8c5ab7e) to head (fd51ac6). Report is 1 commits behind head on release/v0.49.x.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430/graphs/tree.svg?width=650&height=150&src=pr&token=m16qfzIPO7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) ```diff @@ Coverage Diff @@ ## release/v0.49.x #1430 +/- ## =================================================== + Coverage 68.75% 69.68% +0.93% =================================================== Files 754 756 +2 Lines 75837 75883 +46 =================================================== + Hits 52139 52882 +743 + Misses 21042 20310 -732 - Partials 2656 2691 +35 ``` | [Files](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia) | Coverage Δ | | |---|---|---| | [x/fbridge/client/cli/query.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&filepath=x%2Ffbridge%2Fclient%2Fcli%2Fquery.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mYnJpZGdlL2NsaWVudC9jbGkvcXVlcnkuZ28=) | `72.38% <100.00%> (+72.38%)` | :arrow_up: | | [x/fbridge/client/cli/tx.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&filepath=x%2Ffbridge%2Fclient%2Fcli%2Ftx.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mYnJpZGdlL2NsaWVudC9jbGkvdHguZ28=) | `92.00% <100.00%> (+92.00%)` | :arrow_up: | | [x/fbridge/keeper/auth.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&filepath=x%2Ffbridge%2Fkeeper%2Fauth.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-eC9mYnJpZGdlL2tlZXBlci9hdXRoLmdv) | `86.61% <0.00%> (+30.96%)` | :arrow_up: | | [testutil/cli/tm\_mocks.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&filepath=testutil%2Fcli%2Ftm_mocks.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dGVzdHV0aWwvY2xpL3RtX21vY2tzLmdv) | `0.00% <0.00%> (ø)` | | | [types/module/testutil/codec.go](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430?src=pr&el=tree&filepath=types%2Fmodule%2Ftestutil%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia#diff-dHlwZXMvbW9kdWxlL3Rlc3R1dGlsL2NvZGVjLmdv) | `0.00% <0.00%> (ø)` | | ... and [10 files with indirect coverage changes](https://app.codecov.io/gh/Finschia/finschia-sdk/pull/1430/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Finschia)