|
|
@ -87,7 +87,7 @@ func TestBadChart(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestInvalidYaml(t *testing.T) {
|
|
|
|
func TestInvalidYaml(t *testing.T) {
|
|
|
|
m := All(badYamlFileDir, values, namespace, strict).Messages
|
|
|
|
m := All(badYamlFileDir, values, namespace, strict, nil).Messages
|
|
|
|
if len(m) != 1 {
|
|
|
|
if len(m) != 1 {
|
|
|
|
t.Fatalf("All didn't fail with expected errors, got %#v", m)
|
|
|
|
t.Fatalf("All didn't fail with expected errors, got %#v", m)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -97,7 +97,7 @@ func TestInvalidYaml(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestBadValues(t *testing.T) {
|
|
|
|
func TestBadValues(t *testing.T) {
|
|
|
|
m := All(badValuesFileDir, values, namespace, strict).Messages
|
|
|
|
m := All(badValuesFileDir, values, namespace, strict, nil).Messages
|
|
|
|
if len(m) < 1 {
|
|
|
|
if len(m) < 1 {
|
|
|
|
t.Fatalf("All didn't fail with expected errors, got %#v", m)
|
|
|
|
t.Fatalf("All didn't fail with expected errors, got %#v", m)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -107,7 +107,7 @@ func TestBadValues(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestGoodChart(t *testing.T) {
|
|
|
|
func TestGoodChart(t *testing.T) {
|
|
|
|
m := All(goodChartDir, values, namespace, strict).Messages
|
|
|
|
m := All(goodChartDir, values, namespace, strict, nil).Messages
|
|
|
|
if len(m) != 0 {
|
|
|
|
if len(m) != 0 {
|
|
|
|
t.Error("All returned linter messages when it shouldn't have")
|
|
|
|
t.Error("All returned linter messages when it shouldn't have")
|
|
|
|
for i, msg := range m {
|
|
|
|
for i, msg := range m {
|
|
|
@ -135,7 +135,7 @@ func TestHelmCreateChart(t *testing.T) {
|
|
|
|
|
|
|
|
|
|
|
|
// Note: we test with strict=true here, even though others have
|
|
|
|
// Note: we test with strict=true here, even though others have
|
|
|
|
// strict = false.
|
|
|
|
// strict = false.
|
|
|
|
m := All(createdChart, values, namespace, true).Messages
|
|
|
|
m := All(createdChart, values, namespace, true, nil).Messages
|
|
|
|
if ll := len(m); ll != 1 {
|
|
|
|
if ll := len(m); ll != 1 {
|
|
|
|
t.Errorf("All should have had exactly 1 error. Got %d", ll)
|
|
|
|
t.Errorf("All should have had exactly 1 error. Got %d", ll)
|
|
|
|
for i, msg := range m {
|
|
|
|
for i, msg := range m {
|
|
|
@ -149,7 +149,7 @@ func TestHelmCreateChart(t *testing.T) {
|
|
|
|
// lint ignores import-values
|
|
|
|
// lint ignores import-values
|
|
|
|
// See https://github.com/helm/helm/issues/9658
|
|
|
|
// See https://github.com/helm/helm/issues/9658
|
|
|
|
func TestSubChartValuesChart(t *testing.T) {
|
|
|
|
func TestSubChartValuesChart(t *testing.T) {
|
|
|
|
m := All(subChartValuesDir, values, namespace, strict).Messages
|
|
|
|
m := All(subChartValuesDir, values, namespace, strict, nil).Messages
|
|
|
|
if len(m) != 0 {
|
|
|
|
if len(m) != 0 {
|
|
|
|
t.Error("All returned linter messages when it shouldn't have")
|
|
|
|
t.Error("All returned linter messages when it shouldn't have")
|
|
|
|
for i, msg := range m {
|
|
|
|
for i, msg := range m {
|
|
|
|