diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index cedea06..dcd74e6 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -771,14 +771,14 @@ func TestAPIs(t *testing.T) { Name: "HighRequestLatency", Query: "job:request_latency_seconds:mean5m{job=\"myjob\"} > 0.5", LastError: "", - Type: "alerting", + Type: string(RuleTypeAlerting), }, RecordingRule{ Health: RuleHealthGood, Name: "job:http_inprogress_requests:sum", Query: "sum(http_inprogress_requests) by (job)", LastError: "", - Type: "recording", + Type: string(RuleTypeRecording), }, }, }, @@ -872,7 +872,7 @@ func TestAPIs(t *testing.T) { }, Name: "HighRequestLatency", Query: "job:request_latency_seconds:mean5m{job=\"myjob\"} > 0.5", - Type: "alerting", + Type: string(RuleTypeAlerting), EvaluationTime: 0.5, LastEvaluation: time.Date(2020, 5, 18, 15, 52, 53, 450311300, time.UTC), State: "firing", @@ -881,7 +881,7 @@ func TestAPIs(t *testing.T) { Health: RuleHealthGood, Name: "job:http_inprogress_requests:sum", Query: "sum(http_inprogress_requests) by (job)", - Type: "recording", + Type: string(RuleTypeRecording), EvaluationTime: 0.3, LastEvaluation: time.Date(2020, 5, 18, 15, 52, 53, 450311300, time.UTC), },