@ -50,12 +50,13 @@ func TestValidateAllowedExtension(t *testing.T) {
var values = map [ string ] interface { } { "nameOverride" : "" , "httpPort" : 80 }
const defaultName = "test-release"
const namespace = "testNamespace"
const strict = false
func TestTemplateParsing ( t * testing . T ) {
linter := support . Linter { ChartDir : templateTestBasedir }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
res := linter . Messages
if len ( res ) != 1 {
@ -78,7 +79,7 @@ func TestTemplateIntegrationHappyPath(t *testing.T) {
defer os . Rename ( ignoredTemplatePath , wrongTemplatePath )
linter := support . Linter { ChartDir : templateTestBasedir }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
res := linter . Messages
if len ( res ) != 0 {
@ -88,7 +89,7 @@ func TestTemplateIntegrationHappyPath(t *testing.T) {
func TestV3Fail ( t * testing . T ) {
linter := support . Linter { ChartDir : "./testdata/v3-fail" }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
res := linter . Messages
if len ( res ) != 3 {
@ -108,7 +109,7 @@ func TestV3Fail(t *testing.T) {
func TestMultiTemplateFail ( t * testing . T ) {
linter := support . Linter { ChartDir : "./testdata/multi-template-fail" }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
res := linter . Messages
if len ( res ) != 1 {
@ -229,7 +230,7 @@ func TestDeprecatedAPIFails(t *testing.T) {
}
linter := support . Linter { ChartDir : filepath . Join ( tmpdir , mychart . Name ( ) ) }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
if l := len ( linter . Messages ) ; l != 1 {
for i , msg := range linter . Messages {
t . Logf ( "Message %d: %s" , i , msg )
@ -286,7 +287,7 @@ func TestStrictTemplateParsingMapError(t *testing.T) {
linter := & support . Linter {
ChartDir : filepath . Join ( dir , ch . Metadata . Name ) ,
}
Templates ( linter , ch . Values , namespace, strict )
Templates ( linter , ch . Values , defaultName, namespace, strict )
if len ( linter . Messages ) != 0 {
t . Errorf ( "expected zero messages, got %d" , len ( linter . Messages ) )
for i , msg := range linter . Messages {
@ -416,7 +417,7 @@ func TestEmptyWithCommentsManifests(t *testing.T) {
}
linter := support . Linter { ChartDir : filepath . Join ( tmpdir , mychart . Name ( ) ) }
Templates ( & linter , values , namespace, strict )
Templates ( & linter , values , defaultName, namespace, strict )
if l := len ( linter . Messages ) ; l > 0 {
for i , msg := range linter . Messages {
t . Logf ( "Message %d: %s" , i , msg )