|
|
@ -277,6 +277,12 @@ func ttpl(tpl string, v map[string]interface{}) (string, error) {
|
|
|
|
|
|
|
|
|
|
|
|
var testCoalesceValuesYaml = `
|
|
|
|
var testCoalesceValuesYaml = `
|
|
|
|
top: yup
|
|
|
|
top: yup
|
|
|
|
|
|
|
|
bottom: null
|
|
|
|
|
|
|
|
right: Null
|
|
|
|
|
|
|
|
left: NULL
|
|
|
|
|
|
|
|
front: ~
|
|
|
|
|
|
|
|
back:
|
|
|
|
|
|
|
|
side: ""
|
|
|
|
|
|
|
|
|
|
|
|
global:
|
|
|
|
global:
|
|
|
|
name: Ishmael
|
|
|
|
name: Ishmael
|
|
|
@ -316,6 +322,8 @@ func TestCoalesceValues(t *testing.T) {
|
|
|
|
expect string
|
|
|
|
expect string
|
|
|
|
}{
|
|
|
|
}{
|
|
|
|
{"{{.top}}", "yup"},
|
|
|
|
{"{{.top}}", "yup"},
|
|
|
|
|
|
|
|
// The keys bottom, right, left, front, and back should not be present.
|
|
|
|
|
|
|
|
{"{{.side}}", ""},
|
|
|
|
{"{{.name}}", "moby"},
|
|
|
|
{"{{.name}}", "moby"},
|
|
|
|
{"{{.global.name}}", "Ishmael"},
|
|
|
|
{"{{.global.name}}", "Ishmael"},
|
|
|
|
{"{{.global.subject}}", "Queequeg"},
|
|
|
|
{"{{.global.subject}}", "Queequeg"},
|
|
|
|