test helm template -x against subcharts stored as tgz's

pull/3877/head
Chance Zibolski 7 years ago
parent d7e7170993
commit 62a58e8362

@ -27,7 +27,10 @@ import (
"testing" "testing"
) )
var chartPath = "./../../pkg/chartutil/testdata/subpop/charts/subchart1" var (
chartPath = "./../../pkg/chartutil/testdata/subpop/charts/subchart1"
frobnitzChartPath = "./../../pkg/chartutil/testdata/frobnitz"
)
func TestTemplateCmd(t *testing.T) { func TestTemplateCmd(t *testing.T) {
absChartPath, err := filepath.Abs(chartPath) absChartPath, err := filepath.Abs(chartPath)
@ -76,6 +79,13 @@ func TestTemplateCmd(t *testing.T) {
expectKey: "subchart1/charts/subcharta/templates/service.yaml", expectKey: "subchart1/charts/subcharta/templates/service.yaml",
expectValue: "protocol: TCP\n name: foobar", expectValue: "protocol: TCP\n name: foobar",
}, },
{
name: "check_execute_subchart_template_for_tgz_subchart",
desc: "verify --execute single template on a subchart template where the subchart is a .tgz in the chart directory",
args: []string{frobnitzChartPath, "-x", "charts/mariner/templates/placeholder.tpl", "--set", "mariner.name=moon"},
expectKey: "frobnitz/charts/mariner/templates/placeholder.tpl",
expectValue: "Goodbye moon",
},
{ {
name: "check_namespace", name: "check_namespace",
desc: "verify --namespace", desc: "verify --namespace",

Loading…
Cancel
Save