Skip to content

Commit 980d8ac

Browse files
ryanhockstadmattfarina
authored andcommitted
add test for nullifying nested global value
Signed-off-by: Ryan Hockstad <[email protected]> (cherry picked from commit 326c1e3)
1 parent c23e3b6 commit 980d8ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/chartutil/coalesce_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ pequod:
5151
nested:
5252
boat: false
5353
sail: true
54+
foo2: null
5455
ahab:
5556
scope: whale
5657
boat: null
@@ -112,7 +113,7 @@ func TestCoalesceValues(t *testing.T) {
112113
Metadata: &chart.Metadata{Name: "ahab"},
113114
Values: map[string]interface{}{
114115
"global": map[string]interface{}{
115-
"nested": map[string]interface{}{"foo": "bar"},
116+
"nested": map[string]interface{}{"foo": "bar", "foo2": "bar2"},
116117
"nested2": map[string]interface{}{"l2": "ahab"},
117118
},
118119
"scope": "ahab",
@@ -170,6 +171,7 @@ func TestCoalesceValues(t *testing.T) {
170171
{"{{.pequod.ahab.nested.foo}}", "true"},
171172
{"{{.pequod.ahab.global.name}}", "Ishmael"},
172173
{"{{.pequod.ahab.global.nested.foo}}", "bar"},
174+
{"{{.pequod.ahab.global.nested.foo2}}", "<no value>"},
173175
{"{{.pequod.ahab.global.subject}}", "Queequeg"},
174176
{"{{.pequod.ahab.global.harpooner}}", "Tashtego"},
175177
{"{{.pequod.global.name}}", "Ishmael"},

0 commit comments

Comments
 (0)