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

feat: added update password command #255

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

Baalekshan
Copy link
Contributor

### Description:

Introduced litmusctl update password command,
User can now update their passwords using litmusctl

image

image

)

credentials, err := utils.GetCredentials(cmd)
utils.PrintError(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
utils.PrintError(err)
if err != nil {
utils.PrintError(err)
}

Label: "Username",
}
updatePasswordRequest.Username, err = promptUsername.Run()
utils.PrintError(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above, please check if err != nil condition wherever printing err. Please update in all other places

updatePasswordRequest.OldPassword, err = promptOldPassword.Run()
utils.PrintError(err)

NEW_PASSWORD:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of this, you can just add comment
// New password validation

Copy link
Contributor Author

@Baalekshan Baalekshan Sep 17, 2024

Choose a reason for hiding this comment

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

@SarthakJain26 It was for a goto condition
if the new and confirm passwords fails, it agains runs the code under NEW_PASSWORD:
instead of the user requiring to rerun the command again

@SarthakJain26 SarthakJain26 merged commit 0980230 into litmuschaos:master Sep 17, 2024
4 of 5 checks passed
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