mirror of
https://github.com/helm/helm.git
synced 2026-08-08 09:01:25 +00:00
Test for Linting multiple charts with the same vals instance
Signed-off-by: Vibhav Bobade <vibhav.bobde@gmail.com>
This commit is contained in:
4
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/Chart.yaml
vendored
Normal file
4
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/Chart.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
name: multiplecharts-lint-chart-1
|
||||
version: 1
|
||||
icon: ""
|
||||
6
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/templates/configmap.yaml
vendored
Normal file
6
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/templates/configmap.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: multicharttest-chart1-configmap
|
||||
data:
|
||||
dat: |
|
||||
{{ .Values.config | indent 4 }}
|
||||
1
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/values.yaml
vendored
Normal file
1
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-1/values.yaml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
config: "Test"
|
||||
4
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/Chart.yaml
vendored
Normal file
4
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/Chart.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
name: multiplecharts-lint-chart-2
|
||||
version: 1
|
||||
icon: ""
|
||||
5
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/templates/configmap.yaml
vendored
Normal file
5
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/templates/configmap.yaml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: multicharttest-chart2-configmap
|
||||
data:
|
||||
{{ toYaml .Values.config | indent 4 }}
|
||||
2
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/values.yaml
vendored
Normal file
2
cmd/helm/testdata/testcharts/multiplecharts-lint-chart-2/values.yaml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
config:
|
||||
test: "Test"
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user