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 geturi command line into new ioctl #3650

Merged
merged 11 commits into from
Sep 30, 2022

Conversation

LuckyPigeon
Copy link
Contributor

@LuckyPigeon LuckyPigeon commented Sep 27, 2022

Description

Refactor didgeturi 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 #3292

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
  • TestNewDidGetUriCmd

Test Configuration:

  • Firmware version: Windows 10 (WSL Version: Ubuntu 18.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

@LuckyPigeon LuckyPigeon marked this pull request as ready for review September 27, 2022 08:01
@LuckyPigeon LuckyPigeon requested a review from a team as a code owner September 27, 2022 08:01
@LuckyPigeon
Copy link
Contributor Author

@huof6829
I use the same inter-multiple data hash of #3639, but seems it needs a different hash, could you check this one?

@huof6829
Copy link
Contributor

@huof6829 I use the same inter-multiple data hash of #3639, but seems it needs a different hash, could you check this one?

ok

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Merging #3650 (38e56ad) into master (e9732a1) will decrease coverage by 0.28%.
The diff coverage is 80.39%.

@@            Coverage Diff             @@
##           master    #3650      +/-   ##
==========================================
- Coverage   74.95%   74.67%   -0.29%     
==========================================
  Files         269      265       -4     
  Lines       23819    23721      -98     
==========================================
- Hits        17854    17713     -141     
- Misses       5039     5082      +43     
  Partials      926      926              
Impacted Files Coverage Δ
db/trie/mptrie/node.go 100.00% <ø> (ø)
ioctl/newcmd/action/action.go 79.62% <ø> (+0.09%) ⬆️
ioctl/newcmd/node/nodedelegate.go 70.19% <0.00%> (-0.95%) ⬇️
ioctl/newcmd/node/nodeprobationlist.go 90.90% <0.00%> (-4.33%) ⬇️
action/protocol/execution/evm/evm.go 44.57% <26.66%> (-0.86%) ⬇️
db/trie/mptrie/hashnode.go 36.36% <41.17%> (-54.55%) ⬇️
db/trie/mptrie/merklepatriciatrie.go 78.73% <46.80%> (-12.70%) ⬇️
db/trie/mptrie/leafiterator.go 62.06% <50.00%> (ø)
action/protocol/execution/evm/evmstatedbadapter.go 65.87% <64.28%> (-0.04%) ⬇️
db/trie/mptrie/extensionnode.go 91.91% <94.28%> (-1.07%) ⬇️
... and 15 more

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

@huof6829
Copy link
Contributor

@LuckyPigeon fixed.

ioctl/newcmd/did/didgeturi.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didgeturi_test.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didgeturi_test.go Outdated Show resolved Hide resolved
ioctl/newcmd/did/didgeturi_test.go Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

No Coverage information No Coverage information
3.6% 3.6% Duplication

@LuckyPigeon
Copy link
Contributor Author

@LuckyPigeon fixed.

Thanks for the help.

@huof6829 huof6829 merged commit 5389c87 into iotexproject:master Sep 30, 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 geturi command line into new ioctl
3 participants