From 62a58e8362b443898599f12baba8cce96719d1f5 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Wed, 11 Apr 2018 16:28:14 -0700 Subject: [PATCH] test helm template -x against subcharts stored as tgz's --- cmd/helm/template_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/helm/template_test.go b/cmd/helm/template_test.go index bbcc9f3af..46adecca7 100644 --- a/cmd/helm/template_test.go +++ b/cmd/helm/template_test.go @@ -27,7 +27,10 @@ import ( "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) { absChartPath, err := filepath.Abs(chartPath) @@ -76,6 +79,13 @@ func TestTemplateCmd(t *testing.T) { expectKey: "subchart1/charts/subcharta/templates/service.yaml", 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", desc: "verify --namespace",