|
|
@ -90,16 +90,23 @@ func TestAllTemplates(t *testing.T) {
|
|
|
|
{Name: "bar", Data: []byte("bar")},
|
|
|
|
{Name: "bar", Data: []byte("bar")},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Dependencies: []*chart.Chart{
|
|
|
|
Dependencies: []*chart.Chart{
|
|
|
|
{Templates: []*chart.Template{
|
|
|
|
{
|
|
|
|
{Name: "pinky", Data: []byte("pinky")},
|
|
|
|
Templates: []*chart.Template{
|
|
|
|
{Name: "brain", Data: []byte("brain")},
|
|
|
|
{Name: "pinky", Data: []byte("pinky")},
|
|
|
|
}},
|
|
|
|
{Name: "brain", Data: []byte("brain")},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
Dependencies: []*chart.Chart{
|
|
|
|
|
|
|
|
{Templates: []*chart.Template{
|
|
|
|
|
|
|
|
{Name: "innermost", Data: []byte("innermost")},
|
|
|
|
|
|
|
|
}},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
tpls := allTemplates(ch1)
|
|
|
|
tpls := allTemplates(ch1)
|
|
|
|
if len(tpls) != 4 {
|
|
|
|
if len(tpls) != 5 {
|
|
|
|
t.Errorf("Expected 4 charts, got %d", len(tpls))
|
|
|
|
t.Errorf("Expected 5 charts, got %d", len(tpls))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -112,9 +119,11 @@ func TestRenderDependency(t *testing.T) {
|
|
|
|
{Name: "outer", Data: []byte(toptpl)},
|
|
|
|
{Name: "outer", Data: []byte(toptpl)},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Dependencies: []*chart.Chart{
|
|
|
|
Dependencies: []*chart.Chart{
|
|
|
|
{Templates: []*chart.Template{
|
|
|
|
{
|
|
|
|
{Name: "inner", Data: []byte(deptpl)},
|
|
|
|
Templates: []*chart.Template{
|
|
|
|
}},
|
|
|
|
{Name: "inner", Data: []byte(deptpl)},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|