Add test case for removing an entire object

Signed-off-by: Ryan Hockstad <ryanhockstad@gmail.com>
(cherry picked from commit ef2eb55283)
pull/13525/head
Ryan Hockstad 9 months ago committed by Matt Farina
parent 3110d5ff63
commit c23e3b6c49
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -57,6 +57,7 @@ pequod:
nested:
foo: true
boat: null
object: null
`)
func withDeps(c *chart.Chart, deps ...*chart.Chart) *chart.Chart {
@ -118,6 +119,7 @@ func TestCoalesceValues(t *testing.T) {
"name": "ahab",
"boat": true,
"nested": map[string]interface{}{"foo": false, "boat": true},
"object": map[string]interface{}{"foo": "bar"},
},
},
),
@ -227,6 +229,10 @@ func TestCoalesceValues(t *testing.T) {
t.Error("Expected sub-subchart nested boat key to be removed, still present")
}
if _, ok := subsubchart["object"]; ok {
t.Error("Expected sub-subchart object map to be removed, still present")
}
// CoalesceValues should not mutate the passed arguments
is.Equal(valsCopy, vals)
}

Loading…
Cancel
Save