weixin_39593460
weixin_39593460
2020-12-26 08:05

shield: add tests for params & genesis validation; refine validation checks

1) Add tests for x/shield/types/params.go and x/shield/types/genesis.go 2) Refine sanity checks

Description

For contributor use:

  • [ ] Targeted PR against correct branch (see CONTRIBUTING.md)
  • [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • [ ] Code follows the module structure standards.
  • [ ] Wrote unit and integration tests
  • [ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • [ ] Added relevant godoc comments.
  • [ ] Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • [ ] Re-reviewed Files changed in the Github PR explorer

For admin use:

  • [ ] Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • [ ] Reviewers assigned
  • [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]"

该提问来源于开源项目:certikfoundation/shentu

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39995439 weixin_39995439 4月前

    Codecov Report

    Merging #86 into master will decrease coverage by 4.04%. The diff coverage is 26.66%.

    Impacted file tree graph

    diff
    @@            Coverage Diff             @@
    ##           master      #86      +/-   ##
    ==========================================
    - Coverage   53.41%   49.36%   -4.05%     
    ==========================================
      Files          49       57       +8     
      Lines        3385     3786     +401     
    ==========================================
    + Hits         1808     1869      +61     
    - Misses       1450     1776     +326     
    - Partials      127      141      +14     
    

    | Impacted Files | Coverage Δ | | |---|---|---| | x/shield/types/genesis.go | 39.47% <22.22%> (ø) | | | x/shield/types/params.go | 47.54% <33.33%> (ø) | | | x/shield/types/msg.go | 0.00% <0.00%> (ø) | | | x/shield/types/mixed_coins.go | 0.00% <0.00%> (ø) | | | x/shield/types/keys.go | 0.00% <0.00%> (ø) | | | x/shield/types/types.go | 0.00% <0.00%> (ø) | | | x/shield/types/codec.go | 100.00% <0.00%> (ø) | | | x/shield/types/proposal.go | 5.71% <0.00%> (ø) | |

    点赞 评论 复制链接分享
  • weixin_39593460 weixin_39593460 4月前

    lint errors fixed

    点赞 评论 复制链接分享
  • weixin_39975744 weixin_39975744 4月前

    I believe there were some major changes after this. Is this PR still compatible?

    点赞 评论 复制链接分享
  • weixin_39593460 weixin_39593460 4月前

    Yes I asked ZZ to close this PR 😅

    点赞 评论 复制链接分享
  • weixin_39975744 weixin_39975744 4月前

    seems like there are some formatting errors

    点赞 评论 复制链接分享