-
Notifications
You must be signed in to change notification settings - Fork 2k
Set APIVersion on the client, even when Ping fails #546
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #546 +/- ##
==========================================
+ Coverage 49.08% 49.23% +0.14%
==========================================
Files 200 200
Lines 16447 16453 +6
==========================================
+ Hits 8073 8100 +27
+ Misses 7954 7933 -21
Partials 420 420 |
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.
LGTM 🐄 Just one question 👼
cli/command/cli_test.go
Outdated
t.Run(testcase.doc, func(t *testing.T) { | ||
passRetriever := func(_, _ string, _ bool, attempts int) (passphrase string, giveup bool, err error) { | ||
switch attempts { | ||
case 0, 1, 2: |
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.
Not sure I understand why those are here — well, it's for notary.passRetriever
I guess, but those magic number do not help me why we should fail the 3 first time 😅
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.
There's really no significance, it could also be just 0
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.
🤔
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.
Fixed
Refactor to support testing Also add tests Signed-off-by: Daniel Nephin <dnephin@docker.com>
36cb146
to
e828efa
Compare
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.
LGTM
Fixes #149
Refactor to support testing
Also add tests