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

[ioctl] add checking --insecure

Open huof6829 opened this issue 2 years ago • 4 comments

Description

check --insecure value
If has in cmdline, read the value then connect grpc if not has in cmdline, read from config file

Fixes https://github.com/iotexproject/iotex-core/issues/3716

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • [] Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

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
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • 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

huof6829 avatar Jan 12 '23 11:01 huof6829

test : 截屏2023-01-12 19 33 30

huof6829 avatar Jan 12 '23 11:01 huof6829

Codecov Report

Merging #3765 (ae7f0fb) into master (263ff82) will increase coverage by 0.91%. The diff coverage is 80.52%.

:exclamation: Current head ae7f0fb differs from pull request most recent head 9d14d6d. Consider uploading reports for the commit 9d14d6d to get more accurate results

@@            Coverage Diff             @@
##           master    #3765      +/-   ##
==========================================
+ Coverage   74.47%   75.38%   +0.91%     
==========================================
  Files         269      303      +34     
  Lines       23925    25835    +1910     
==========================================
+ Hits        17818    19477    +1659     
- Misses       5174     5341     +167     
- Partials      933     1017      +84     
Impacted Files Coverage Δ
action/actctx.go 90.62% <ø> (+6.25%) :arrow_up:
action/action.go 82.35% <ø> (ø)
action/action_deserializer.go 57.14% <ø> (ø)
action/candidate_update.go 88.88% <0.00%> (-4.14%) :arrow_down:
action/consignment_transfer.go 90.41% <ø> (ø)
action/const.go 100.00% <ø> (ø)
action/execution.go 83.78% <ø> (ø)
action/grantreward.go 68.57% <ø> (ø)
action/protocol/account/protocol.go 86.90% <ø> (ø)
action/protocol/dock.go 100.00% <ø> (ø)
... and 282 more

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

codecov[bot] avatar Jan 12 '23 11:01 codecov[bot]

can we change lines like https://github.com/iotexproject/iotex-core/pull/3765/files#diff-480b6a42e77da9d54219c1fb6119137e050dfd87134a5d041c80e2ff978b7461L86 as AccountCmd.PersistentFlags().BoolVar(&config.Insecure, "insecure", config.ReadConfig.SecureConnect, config.TranslateInLang(_flagInsecure, config.UILanguage))?

OK. test right after modified

huof6829 avatar Jan 17 '23 15:01 huof6829

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
2.9% 2.9% Duplication

sonarqubecloud[bot] avatar Feb 07 '23 02:02 sonarqubecloud[bot]

Close b/c it has been inactive for 1+yr.

raullenchai avatar May 30 '24 20:05 raullenchai