From 004623e33c4962772714e2b875522f29dd4dbd56 Mon Sep 17 00:00:00 2001 From: Richard Lavey Date: Fri, 7 Jan 2022 10:45:59 +0000 Subject: [PATCH] #146 add yml and tpl to supported file extensions write a warning when files are ignored Signed-off-by: Richard Lavey --- pkg/unittest/test_job.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/unittest/test_job.go b/pkg/unittest/test_job.go index 52ebc4bd..db15be2b 100644 --- a/pkg/unittest/test_job.go +++ b/pkg/unittest/test_job.go @@ -611,7 +611,7 @@ func (t *TestJob) parseManifestsFromOutputOfFiles(outputOfFiles map[string]strin for file, rendered := range outputOfFiles { switch filepath.Ext(file) { - case ".yaml": + case ".tpl", ".yaml", ".yml": manifest, err := parseYamlFile(rendered) if err != nil { return nil, err @@ -619,6 +619,9 @@ func (t *TestJob) parseManifestsFromOutputOfFiles(outputOfFiles map[string]strin manifestsOfFiles[file] = manifest case ".txt": manifestsOfFiles[file] = parseTextFile(rendered) + default: + fmt.Printf("Extension %s is not supported. File %s is ignored.", filepath.Ext(file), file) + fmt.Println() } }