@@ -717,20 +717,22 @@ func TestAPIs(t *testing.T) {
717717 "annotations" : map [string ]interface {}{
718718 "summary" : "High request latency" ,
719719 },
720- "duration" : 600 ,
721- "health" : "ok" ,
722720 "labels" : map [string ]interface {}{
723721 "severity" : "page" ,
724722 },
725- "name" : "HighRequestLatency" ,
726- "query" : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
727- "type" : "alerting" ,
723+ "duration" : 600 ,
724+ "health" : "ok" ,
725+ "name" : "HighRequestLatency" ,
726+ "query" : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
727+ "lastError" : "" ,
728+ "type" : "alerting" ,
728729 },
729730 {
730- "health" : "ok" ,
731- "name" : "job:http_inprogress_requests:sum" ,
732- "query" : "sum(http_inprogress_requests) by (job)" ,
733- "type" : "recording" ,
731+ "health" : "ok" ,
732+ "name" : "job:http_inprogress_requests:sum" ,
733+ "query" : "sum(http_inprogress_requests) by (job)" ,
734+ "lastError" : "" ,
735+ "type" : "recording" ,
734736 },
735737 },
736738 },
@@ -769,12 +771,14 @@ func TestAPIs(t *testing.T) {
769771 Name : "HighRequestLatency" ,
770772 Query : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
771773 LastError : "" ,
774+ Type : "alerting" ,
772775 },
773776 RecordingRule {
774777 Health : RuleHealthGood ,
775778 Name : "job:http_inprogress_requests:sum" ,
776779 Query : "sum(http_inprogress_requests) by (job)" ,
777780 LastError : "" ,
781+ Type : "recording" ,
778782 },
779783 },
780784 },
@@ -861,14 +865,14 @@ func TestAPIs(t *testing.T) {
861865 Annotations : model.LabelSet {
862866 "summary" : "High request latency" ,
863867 },
868+ Duration : 600 ,
869+ Health : RuleHealthGood ,
864870 Labels : model.LabelSet {
865871 "severity" : "page" ,
866872 },
867- Duration : 600 ,
868- Health : RuleHealthGood ,
869873 Name : "HighRequestLatency" ,
870874 Query : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
871- LastError : " " ,
875+ Type : "alerting " ,
872876 EvaluationTime : 0.5 ,
873877 LastEvaluation : time .Date (2020 , 5 , 18 , 15 , 52 , 53 , 450311300 , time .UTC ),
874878 State : "firing" ,
@@ -877,7 +881,7 @@ func TestAPIs(t *testing.T) {
877881 Health : RuleHealthGood ,
878882 Name : "job:http_inprogress_requests:sum" ,
879883 Query : "sum(http_inprogress_requests) by (job)" ,
880- LastError : " " ,
884+ Type : "recording " ,
881885 EvaluationTime : 0.3 ,
882886 LastEvaluation : time .Date (2020 , 5 , 18 , 15 , 52 , 53 , 450311300 , time .UTC ),
883887 },
0 commit comments