ref(pkg/chartutil): move comment

Move comment out of test. Move ref location in test.
pull/2704/head
Sam Leavens 8 years ago
parent 51b59497ee
commit 8df52b6501

@ -280,6 +280,9 @@ func coalesceValues(c *chart.Chart, v map[string]interface{}) (map[string]interf
for key, val := range nv {
if value, ok := v[key]; ok {
if value == nil {
// When the YAML value is null, we remove the value's key.
// This allows Helm's various sources of values (value files or --set) to
// remove incompatible keys from any previous chart, file, or set values.
delete(v, key)
} else if dest, ok := value.(map[string]interface{}); ok {
// if v[key] is a table, merge nv's val table into v[key].

@ -275,6 +275,7 @@ func ttpl(tpl string, v map[string]interface{}) (string, error) {
return b.String(), nil
}
// ref: http://www.yaml.org/spec/1.2/spec.html#id2803362
var testCoalesceValuesYaml = `
top: yup
bottom: null
@ -350,10 +351,6 @@ func TestCoalesceValues(t *testing.T) {
}
}
// When the YAML value is null, we remove the value's key.
// This allows Helm's various sources of values (value files or --set) to
// remove incompatible keys from any previous chart, file, or set values.
// ref: http://www.yaml.org/spec/1.2/spec.html#id2803362
nullKeys := []string{"bottom", "right", "left", "front"}
for _, nullKey := range nullKeys {
if _, ok := v[nullKey]; ok {

Loading…
Cancel
Save