|
|
@ -97,6 +97,8 @@ func TestInstallReleaseDryRun(t *testing.T) {
|
|
|
|
{Name: "hello", Data: []byte("hello: world")},
|
|
|
|
{Name: "hello", Data: []byte("hello: world")},
|
|
|
|
{Name: "goodbye", Data: []byte("goodbye: world")},
|
|
|
|
{Name: "goodbye", Data: []byte("goodbye: world")},
|
|
|
|
{Name: "empty", Data: []byte("")},
|
|
|
|
{Name: "empty", Data: []byte("")},
|
|
|
|
|
|
|
|
{Name: "with-partials", Data: []byte("hello: {{ template \"partials/_planet\" . }}")},
|
|
|
|
|
|
|
|
{Name: "partials/_planet", Data: []byte("Earth")},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
DryRun: true,
|
|
|
|
DryRun: true,
|
|
|
@ -117,6 +119,14 @@ func TestInstallReleaseDryRun(t *testing.T) {
|
|
|
|
t.Errorf("unexpected output: %s", res.Release.Manifest)
|
|
|
|
t.Errorf("unexpected output: %s", res.Release.Manifest)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !strings.Contains(res.Release.Manifest, "hello: Earth") {
|
|
|
|
|
|
|
|
t.Errorf("Should contain partial content. %s", res.Release.Manifest)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if strings.Contains(res.Release.Manifest, "hello: {{ template \"partials/_planet\" . }}") {
|
|
|
|
|
|
|
|
t.Errorf("Should not contain partial templates itself. %s", res.Release.Manifest)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if strings.Contains(res.Release.Manifest, "empty") {
|
|
|
|
if strings.Contains(res.Release.Manifest, "empty") {
|
|
|
|
t.Errorf("Should not contain template data for an empty file. %s", res.Release.Manifest)
|
|
|
|
t.Errorf("Should not contain template data for an empty file. %s", res.Release.Manifest)
|
|
|
|
}
|
|
|
|
}
|
|
|
|