|
|
|
@ -423,6 +423,15 @@ func TestAlterFuncMap(t *testing.T) {
|
|
|
|
|
Dependencies: []*chart.Chart{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Check nested reference in include FuncMap
|
|
|
|
|
d := &chart.Chart{
|
|
|
|
|
Metadata: &chart.Metadata{Name: "nested"},
|
|
|
|
|
Templates: []*chart.Template{
|
|
|
|
|
{Name: "templates/quote", Data: []byte(`{{include "nested/templates/quote" . | indent 2}} dead.`)},
|
|
|
|
|
{Name: "templates/_partial", Data: []byte(`{{.Release.Name}} - he`)},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
v := chartutil.Values{
|
|
|
|
|
"Values": &chart.Config{Raw: ""},
|
|
|
|
|
"Chart": c.Metadata,
|
|
|
|
@ -441,6 +450,12 @@ func TestAlterFuncMap(t *testing.T) {
|
|
|
|
|
t.Errorf("Expected %q, got %q (%v)", expect, got, out)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_, err = New().Render(d, v)
|
|
|
|
|
expectErrName := "nested/templates/quote"
|
|
|
|
|
if err == nil {
|
|
|
|
|
t.Errorf("Expected err of nested reference name: %v", expectErrName)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
reqChart := &chart.Chart{
|
|
|
|
|
Metadata: &chart.Metadata{Name: "conan"},
|
|
|
|
|
Templates: []*chart.Template{
|
|
|
|
|