@@ -717,20 +717,22 @@ func TestAPIs(t *testing.T) {
717
717
"annotations" : map [string ]interface {}{
718
718
"summary" : "High request latency" ,
719
719
},
720
- "duration" : 600 ,
721
- "health" : "ok" ,
722
720
"labels" : map [string ]interface {}{
723
721
"severity" : "page" ,
724
722
},
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" ,
728
729
},
729
730
{
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" ,
734
736
},
735
737
},
736
738
},
@@ -769,12 +771,14 @@ func TestAPIs(t *testing.T) {
769
771
Name : "HighRequestLatency" ,
770
772
Query : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
771
773
LastError : "" ,
774
+ Type : "alerting" ,
772
775
},
773
776
RecordingRule {
774
777
Health : RuleHealthGood ,
775
778
Name : "job:http_inprogress_requests:sum" ,
776
779
Query : "sum(http_inprogress_requests) by (job)" ,
777
780
LastError : "" ,
781
+ Type : "recording" ,
778
782
},
779
783
},
780
784
},
@@ -861,14 +865,14 @@ func TestAPIs(t *testing.T) {
861
865
Annotations : model.LabelSet {
862
866
"summary" : "High request latency" ,
863
867
},
868
+ Duration : 600 ,
869
+ Health : RuleHealthGood ,
864
870
Labels : model.LabelSet {
865
871
"severity" : "page" ,
866
872
},
867
- Duration : 600 ,
868
- Health : RuleHealthGood ,
869
873
Name : "HighRequestLatency" ,
870
874
Query : "job:request_latency_seconds:mean5m{job=\" myjob\" } > 0.5" ,
871
- LastError : " " ,
875
+ Type : "alerting " ,
872
876
EvaluationTime : 0.5 ,
873
877
LastEvaluation : time .Date (2020 , 5 , 18 , 15 , 52 , 53 , 450311300 , time .UTC ),
874
878
State : "firing" ,
@@ -877,7 +881,7 @@ func TestAPIs(t *testing.T) {
877
881
Health : RuleHealthGood ,
878
882
Name : "job:http_inprogress_requests:sum" ,
879
883
Query : "sum(http_inprogress_requests) by (job)" ,
880
- LastError : " " ,
884
+ Type : "recording " ,
881
885
EvaluationTime : 0.3 ,
882
886
LastEvaluation : time .Date (2020 , 5 , 18 , 15 , 52 , 53 , 450311300 , time .UTC ),
883
887
},
0 commit comments