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

[ioctl] Build did register command line into new ioctl #3583

Merged
merged 24 commits into from
Sep 7, 2022

Conversation

LuckyPigeon
Copy link
Contributor

@LuckyPigeon LuckyPigeon commented Aug 3, 2022

Description

Build did and didregister 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 #3288

Type of change

Please delete options that are not relevant.

  • 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

  • make test
  • TestNewDidCmd
  • TestNewDidRegisterCmd

Test Configuration:

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

Checklist:

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

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #3583 (852f3df) into master (a20e489) will decrease coverage by 0.81%.
The diff coverage is 75.65%.

❗ Current head 852f3df differs from pull request most recent head 5292388. Consider uploading reports for the commit 5292388 to get more accurate results

@@            Coverage Diff             @@
##           master    #3583      +/-   ##
==========================================
- Coverage   75.43%   74.62%   -0.82%     
==========================================
  Files         247      264      +17     
  Lines       22845    23695     +850     
==========================================
+ Hits        17233    17682     +449     
- Misses       4685     5092     +407     
+ Partials      927      921       -6     
Impacted Files Coverage Δ
action/action_deserializer.go 57.14% <ø> (ø)
action/protocol/poll/nativestaking.go 41.08% <0.00%> (-0.65%) ⬇️
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%) ⬇️
blockchain/block/block_deserializer.go 71.15% <ø> (ø)
blockchain/blockchain.go 0.89% <0.00%> (ø)
blockchain/filedao/filedao_legacy.go 85.80% <ø> (ø)
... and 112 more

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

@LuckyPigeon LuckyPigeon marked this pull request as ready for review August 4, 2022 00:58
@LuckyPigeon LuckyPigeon requested a review from a team as a code owner August 4, 2022 00:58
ioctl/newcmd/did/did.go Show resolved Hide resolved
ioctl/newcmd/did/did.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/did.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/did.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/did_test.go Show resolved Hide resolved
ioctl/newcmd/did/didregister.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didregister.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didregister_test.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didregister_test.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didregister_test.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didregister.go Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 7, 2022

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.7% 3.7% Duplication

@Liuhaai Liuhaai merged commit 94aad86 into iotexproject:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ioctl] build did deregister command line into new ioctl
4 participants