iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

[ioctl] Build action transfer command line into new ioctl

Open LuckyPigeon opened this issue 2 years ago • 2 comments

Description

Build actiontransfer command in new ioctl, with the following note.

  • Use client interface to construct the Cobra command.
  • Output package is deprecated, replace it with errors package.
  • Replace fmt.Println with cmd.Println
  • Refactor unit test to cover the modification.

Fixes #3323

Type of change

Please delete options that are not relevant.

  • [x] Code refactor or improvement

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] make test
  • [x] TestNewActionTransferCmd

Test Configuration:

  • Firmware version: Ubuntu 21.04
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules****

LuckyPigeon avatar Jul 22 '22 22:07 LuckyPigeon

Codecov Report

Merging #3574 (ee9d1c1) into master (a20e489) will decrease coverage by 0.84%. The diff coverage is 75.13%.

@@            Coverage Diff             @@
##           master    #3574      +/-   ##
==========================================
- Coverage   75.43%   74.58%   -0.85%     
==========================================
  Files         247      262      +15     
  Lines       22845    23671     +826     
==========================================
+ Hits        17233    17656     +423     
- Misses       4685     5093     +408     
+ Partials      927      922       -5     
Impacted Files Coverage Δ
action/action_deserializer.go 57.14% <ø> (ø)
action/protocol/poll/nativestaking.go 41.08% <0.00%> (-0.65%) :arrow_down:
action/protocol/poll/staking_command.go 10.71% <0.00%> (ø)
action/protocol/staking/read_state.go 15.38% <0.00%> (ø)
action/protocol/vote/probationlist.go 87.50% <ø> (ø)
api/blocklistener.go 70.73% <0.00%> (ø)
api/websocket.go 5.17% <0.00%> (-0.19%) :arrow_down:
blockchain/block/block_deserializer.go 71.15% <ø> (ø)
blockchain/blockchain.go 0.89% <0.00%> (ø)
blockchain/filedao/filedao_legacy.go 85.80% <ø> (ø)
... and 111 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Aug 03 '22 06:08 codecov[bot]

@huof6829 Thanks for the improvement!

LuckyPigeon avatar Aug 03 '22 21:08 LuckyPigeon

@LuckyPigeon could you help the failure of test?

Liuhaai avatar Sep 06 '22 21:09 Liuhaai

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
3.8% 3.8% Duplication

sonarqubecloud[bot] avatar Sep 07 '22 00:09 sonarqubecloud[bot]

@LuckyPigeon could you help the failure of test?

fixed

huof6829 avatar Sep 07 '22 01:09 huof6829

@huof6829 Thanks for the help!

LuckyPigeon avatar Sep 07 '22 12:09 LuckyPigeon