-
Notifications
You must be signed in to change notification settings - Fork 97
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
fix: Fix http basic flag. #240
Conversation
Codecov Report
@@ Coverage Diff @@
## main #240 +/- ##
==========================================
+ Coverage 67.16% 69.48% +2.32%
==========================================
Files 72 75 +3
Lines 3816 3936 +120
==========================================
+ Hits 2563 2735 +172
+ Misses 1001 960 -41
+ Partials 252 241 -11
Continue to review full report at Codecov.
|
71b12fa
to
8271c69
Compare
expectedValue: "foo:bar", | ||
}, | ||
{ | ||
name: "using credentials flag", |
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.
Should this be authBasicCredentialsFlag
?
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.
Exact!
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!
fd2bb50
to
5e41b21
Compare
It seems viper function RegisterAlias() does not works as expected, the GetStringSlice() function does not returns anything for any flag (the aliased as well as the alias). So the fix consist of not using RegisterAlias() and simply handle both flags. Also the PR move some bootstrap code from cmd/container.go and cmd/root.go inside package cmd/internal/http_basic.go. Now, all code related to http basic feature is located there.
5e41b21
to
6ad8354
Compare
fix: Fix http basic flag
It seems viper function RegisterAlias() does not works as expected, the GetStringSlice() function does not returns anything for any flag (the aliased as well as the alias).
So the fix consist of not using RegisterAlias() and simply handle both flags.
Also the PR move some bootstrap code from cmd/container.go and cmd/root.go inside package cmd/internal.
Now, all code related to http basic feature is located there.
Type of change
What parts of the code are impacted ?
Checklist:
I have made corresponding changes to the documentation