-
Notifications
You must be signed in to change notification settings - Fork 130
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix read pwd from non-tty input #996
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matejvasek The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9c532f5
to
e6e256a
Compare
Codecov Report
@@ Coverage Diff @@
## main #996 +/- ##
==========================================
+ Coverage 46.27% 46.71% +0.44%
==========================================
Files 57 57
Lines 7475 7505 +30
==========================================
+ Hits 3459 3506 +47
+ Misses 3689 3669 -20
- Partials 327 330 +3
Continue to review full report at Codecov.
|
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.
Could a test be added for this?
e6e256a
to
259cbb5
Compare
ddb7668
to
e774064
Compare
Signed-off-by: Matej Vasek <mvasek@redhat.com>
e774064
to
9994d8a
Compare
@lance test added. |
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.
Just a couple of questions. Overall looks good. Thanks for adding the test!
/lgtm
}() | ||
|
||
go func() { | ||
chars := expectedCreds.Username + enter + expectedCreds.Password + enter |
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.
@matejvasek sorry for my ignorance here, but where does enter
come from? I only see it twice in this file and it appears to be uninitalized, but I know that can't be the case or it would not compile.
chars := expectedCreds.Username + enter + expectedCreds.Password + enter | ||
for _, ch := range chars { | ||
_, _ = console.Send(string(ch)) | ||
time.Sleep(time.Millisecond * 50) |
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 do you need to sleep here?
Changes
/kind bug
Release Note