From 9d39fdad0cb62fcbea3e6841b7f9188eb6120a26 Mon Sep 17 00:00:00 2001 From: akerele abraham Date: Mon, 18 Nov 2019 22:54:52 +0100 Subject: [PATCH] unittest: check for rule files existence (#6075) Signed-off-by: akerele abraham --- cmd/promtool/unittest.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/promtool/unittest.go b/cmd/promtool/unittest.go index 26370f41b..9f5ac09cc 100644 --- a/cmd/promtool/unittest.go +++ b/cmd/promtool/unittest.go @@ -145,6 +145,9 @@ func resolveAndGlobFilepaths(baseDir string, utf *unitTestFile) error { if err != nil { return err } + if len(m) <= 0 { + fmt.Fprintln(os.Stderr, " WARNING: no file match pattern", rf) + } globbedFiles = append(globbedFiles, m...) } utf.RuleFiles = globbedFiles