Test for Linting multiple charts with the same vals instance

Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
pull/6241/head
Vibhav Bobade 6 years ago
parent 7da1f35386
commit 9ab927f0bb

@ -0,0 +1,4 @@
apiVersion: v1
name: multiplecharts-lint-chart-1
version: 1
icon: ""

@ -0,0 +1,6 @@
apiVersion: v1
metadata:
name: multicharttest-chart1-configmap
data:
dat: |
{{ .Values.config | indent 4 }}

@ -0,0 +1,4 @@
apiVersion: v1
name: multiplecharts-lint-chart-2
version: 1
icon: ""

@ -0,0 +1,5 @@
apiVersion: v1
metadata:
name: multicharttest-chart2-configmap
data:
{{ toYaml .Values.config | indent 4 }}

@ -31,6 +31,8 @@ var (
chartMissingManifest = "../../cmd/helm/testdata/testcharts/chart-missing-manifest"
chartSchema = "../../cmd/helm/testdata/testcharts/chart-with-schema"
chartSchemaNegative = "../../cmd/helm/testdata/testcharts/chart-with-schema-negative"
chart1MultipleChartLint = "../../cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1"
chart2MultipleChartLint = "../../cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2"
)
func TestLintChart(t *testing.T) {
@ -56,3 +58,12 @@ func TestLintChart(t *testing.T) {
t.Error(err)
}
}
func TestLint_MultipleCharts(t *testing.T) {
testCharts := []string{chart2MultipleChartLint, chart1MultipleChartLint}
testLint := NewLint()
if result := testLint.Run(testCharts, values); len(result.Errors) == 0 {
t.Error(result.Errors)
}
}

Loading…
Cancel
Save