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

[bug-985]: Update flag descriptions and move flags to relevant commands #238

Merged
merged 5 commits into from
Jul 21, 2023

Conversation

atye
Copy link
Contributor

@atye atye commented Jul 19, 2023

Description

  • Defines the admin-token, addr, and insecure flags only on the relevant commands (karavictl generate, storage, role, rolebinding, tenant) to accurately reflect usage
  • Updates admin-token and addr as required flags for relevant commands so if the user doesn't provide them, the output is clear about it
  • Removes unused functionality that was put in place by Cobra by default

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#895

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

Existing unit tests updated.

@@ -58,7 +58,7 @@ func TestRoleCreateHandler(t *testing.T) {

cmd := NewRootCmd()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, why did we do a NewRootCmd() here instead of NewRoleCreateCmd()? Then we don't need to add the role, create, into the Args?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not entirely sure. The other tests have this pattern and I followed it because it doesn't seem bad.

@atye
Copy link
Contributor Author

atye commented Jul 20, 2023

run e2e test

@atye atye merged commit 292f801 into main Jul 21, 2023
@atye atye deleted the bug-895-update-karavictl-cli branch July 21, 2023 14:06
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.

3 participants