-
Notifications
You must be signed in to change notification settings - Fork 165
Add validation and unit test for empty credentials #3159
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
Add validation and unit test for empty credentials #3159
Conversation
|
Hi @intojhanurag. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3159 +/- ##
==========================================
- Coverage 59.39% 55.64% -3.75%
==========================================
Files 134 134
Lines 13514 13521 +7
==========================================
- Hits 8026 7524 -502
- Misses 4547 5062 +515
+ Partials 941 935 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @gauron99 |
|
helm installation is failing, unrelated; its failing everywhere |
|
Haha, thank God, I thought I did something blunder 😅 |
|
no worries, thats why we have tests to catch any possible "blunders" anyways... this case is not that though. its azure front door. We will rerun tests when the service seems up and running again |
|
/retest |
1 similar comment
|
/retest |
fd05c8c to
92776d6
Compare
|
Hey @gauron99 , Is it good to go now ? |
|
you have some third party changes |
cmd/prompt/prompt_test.go
Outdated
| } | ||
| }) | ||
| } | ||
| t.Run("empty username or password returns error", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not put this as part of the for loop above?
aec3364 to
5332270
Compare
Yeah , Due to "code styles" failure I ran the goimport -w . command in the repo . |
5332270 to
0bc91f3
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: intojhanurag The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR improves the NewPromptForCredentials function by adding validation to handle empty username or password inputs. It ensures users cannot proceed with blank credentials.
Additionally, a new unit test has been added to verify that the function correctly returns an error when either field is left empty.