Add validation and unit test for empty credentials
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.
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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 55.64%. Comparing base (0bc91f3) to head (aec3364).
:warning: Report is 3 commits behind head on main.
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
| Flag | Coverage Δ | |
|---|---|---|
| e2e-tests | ? |
|
| integration-tests | 54.66% <100.00%> (+1.63%) |
:arrow_up: |
| unit-tests | 46.71% <100.00%> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hey @gauron99 I’m just curious, I only added one extra test case and a small validation check for empty credentials, but it seems a lot of E2E and integration tests started failing. My local make test passed successfully. Would love to understand this behavior better.
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
/retest
Hey @gauron99 , Is it good to go now ?
you have some third party changes
you have some third party changes
Yeah , Due to "code styles" failure I ran the goimport -w . command in the repo .
[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.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment