-
Notifications
You must be signed in to change notification settings - Fork 6.4k
fix: fix parameter name when the value is a list (#7360) #7362
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
Signed-off-by: Assel Meher <asselmeher@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #7362 +/- ##
==========================================
+ Coverage 41.12% 41.25% +0.13%
==========================================
Files 158 161 +3
Lines 21365 21509 +144
==========================================
+ Hits 8786 8874 +88
- Misses 11313 11378 +65
+ Partials 1266 1257 -9
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.
LGTM
util/helm/helm_test.go
Outdated
@@ -192,7 +192,7 @@ func Test_flatVals(t *testing.T) { | |||
t.Run("Array", func(t *testing.T) { | |||
output := map[string]string{} | |||
|
|||
flatVals(map[string]interface{}{"foo": []interface{}{"bar"}}, output) | |||
flatVals(map[string]interface{}{"foo": []interface{}{"bar", "baz"}}, output) | |||
|
|||
assert.Equal(t, map[string]string{"foo[0]": "bar"}, output) |
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 the expected output be map[string]string{"foo[0]": "bar", "foo[1]": "baz"}
?
@@ -171,8 +171,9 @@ func flatVals(input interface{}, output map[string]string, prefixes ...string) { | |||
flatVals(v, output, append(prefixes, k)...) | |||
} | |||
case []interface{}: | |||
p := append([]string(nil), prefixes...) |
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.
👍
Fixes #7360
Checklist: