|
|
|
@ -35,6 +35,7 @@ const badChartDir = "rules/testdata/badchartfile"
|
|
|
|
|
const badValuesFileDir = "rules/testdata/badvaluesfile"
|
|
|
|
|
const badYamlFileDir = "rules/testdata/albatross"
|
|
|
|
|
const goodChartDir = "rules/testdata/goodone"
|
|
|
|
|
const subChartValuesDir = "rules/testdata/withsubchart"
|
|
|
|
|
|
|
|
|
|
func TestBadChart(t *testing.T) {
|
|
|
|
|
m := All(badChartDir, values, namespace, strict).Messages
|
|
|
|
@ -144,3 +145,15 @@ func TestHelmCreateChart(t *testing.T) {
|
|
|
|
|
t.Errorf("Unexpected lint error: %s", msg)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// lint ignores import-values
|
|
|
|
|
// See https://github.com/helm/helm/issues/9658
|
|
|
|
|
func TestSubChartValuesChart(t *testing.T) {
|
|
|
|
|
m := All(subChartValuesDir, values, namespace, strict).Messages
|
|
|
|
|
if len(m) != 0 {
|
|
|
|
|
t.Error("All returned linter messages when it shouldn't have")
|
|
|
|
|
for i, msg := range m {
|
|
|
|
|
t.Logf("Message %d: %s", i, msg)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|