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 config get command line into new ioctl #3467

Closed
huof6829 opened this issue Jun 23, 2022 · 2 comments · Fixed by #3552
Closed

[ioctl] build config get command line into new ioctl #3467

huof6829 opened this issue Jun 23, 2022 · 2 comments · Fixed by #3552
Labels
good first issue Good for newcomers

Comments

@huof6829
Copy link
Contributor

What would you like to be added

  • Step 1: refactor command _configGetCmd into ./ioctl/newcmd/config/config_get.go
  • Step 2: create ./ioctl/newcmd/config/config_get_test.go to add unit test

Notes:

  1. Use client interface to construct the Cobra command.
  2. Output package is deprecated. e.g. output.PrintError could be replaced with errors.Wrap.
  3. Global variables (config.ReadConfig config.DefaultConfigFile etc.) have been wrapped into client interface. Please use client interface to access them if needed
  4. The logic of new code should be similar to the old one.
  5. In each unit test, the results should be checked whether they are as the expected.

Example:

  1. https://github.com/iotexproject/iotex-core/blob/master/ioctl/newcmd/account/accountinfo.go
  2. https://github.com/iotexproject/iotex-core/blob/master/ioctl/newcmd/account/accountdelete.go
  3. https://github.com/iotexproject/iotex-core/blob/master/ioctl/newcmd/account/accountcreateadd.go

Why is this needed

Unit tests couldn't be added for the old ioctl command (./ioctl/cmd)

@huof6829 huof6829 added the good first issue Good for newcomers label Jun 23, 2022
@pocockn
Copy link
Contributor

pocockn commented Jul 5, 2022

I can action this

@huof6829
Copy link
Contributor Author

huof6829 commented Jul 6, 2022

I can action this

Welcome! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants