From 8d4aa5d114354a45dbb8a93ac707c9dc0207f55b Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 7 Jun 2016 15:51:20 +0200 Subject: [PATCH] test(alerting): update dashboard json --- pkg/services/sqlstore/dashboard_parser_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/services/sqlstore/dashboard_parser_test.go b/pkg/services/sqlstore/dashboard_parser_test.go index 331e9f58478..7dc508c50f2 100644 --- a/pkg/services/sqlstore/dashboard_parser_test.go +++ b/pkg/services/sqlstore/dashboard_parser_test.go @@ -108,7 +108,7 @@ func TestAlertModel(t *testing.T) { "warnOperator": ">", "critOperator": ">", "aggregator": "sum", - "queryRange": "10m", + "queryRange": 3600, "frequency": 10, "name": "active desktop users", "description": "restart webservers" @@ -195,9 +195,9 @@ func TestAlertModel(t *testing.T) { "warnLevel": 300, "critLevel": 500, "aggregator": "avg", - "queryRange": "10m", + "queryRange": 3600, "frequency": 10, - "title": "active mobile users", + "name": "active mobile users", "description": "restart itunes" }, "links": [] @@ -385,7 +385,8 @@ func TestAlertModel(t *testing.T) { So(v.Aggregator, ShouldNotBeEmpty) So(v.Query, ShouldNotBeEmpty) So(v.QueryRefId, ShouldNotBeEmpty) - So(v.QueryRange, ShouldNotBeEmpty) + So(v.QueryRange, ShouldNotEqual, 0) + So(v.Frequency, ShouldNotEqual, 0) So(v.Name, ShouldNotBeEmpty) So(v.Description, ShouldNotBeEmpty) }