From 2875f6e5403dd817a06030cc9efc8ead01f3deda Mon Sep 17 00:00:00 2001
From: Povilas Versockas
Date: Fri, 24 May 2019 18:48:44 +0300
Subject: [PATCH] Fix tests
---
cmd/thanos/rule.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/thanos/rule.go b/cmd/thanos/rule.go
index 737aad81ffe..022a9f21aaa 100644
--- a/cmd/thanos/rule.go
+++ b/cmd/thanos/rule.go
@@ -139,7 +139,7 @@ func registerRule(m map[string]setupFunc, app *kingpin.Application, name string)
fileSD = file.NewDiscovery(conf, logger)
}
- if fileSD == nil {
+ if fileSD == nil || len(*queries) == 0 {
return errors.Errorf("No --query parameter was given.")
}