Update prometheus_test.go

This commit is contained in:
Asim Aslam 2019-01-25 16:12:57 +00:00 committed by Vasiliy Tolstov
parent 39980dea2e
commit fd8eb72e9c

View File

@ -68,13 +68,13 @@ func TestPrometheusMetrics(t *testing.T) {
list, _ := prometheus.DefaultGatherer.Gather() list, _ := prometheus.DefaultGatherer.Gather()
metric := findMetricByName(list, dto.MetricType_SUMMARY, "micro_request_durations_microseconds") metric := findMetricByName(list, dto.MetricType_SUMMARY, "micro_request_duration_microseconds")
assert.Equal(t, *metric.Metric[0].Label[0].Name, "method") assert.Equal(t, *metric.Metric[0].Label[0].Name, "method")
assert.Equal(t, *metric.Metric[0].Label[0].Value, "Test.Method") assert.Equal(t, *metric.Metric[0].Label[0].Value, "Test.Method")
assert.Equal(t, *metric.Metric[0].Summary.SampleCount, uint64(2)) assert.Equal(t, *metric.Metric[0].Summary.SampleCount, uint64(2))
assert.True(t, *metric.Metric[0].Summary.SampleSum > 0) assert.True(t, *metric.Metric[0].Summary.SampleSum > 0)
metric = findMetricByName(list, dto.MetricType_COUNTER, "micro_requests_total") metric = findMetricByName(list, dto.MetricType_COUNTER, "micro_request_total")
assert.Equal(t, *metric.Metric[0].Label[0].Name, "method") assert.Equal(t, *metric.Metric[0].Label[0].Name, "method")
assert.Equal(t, *metric.Metric[0].Label[0].Value, "Test.Method") assert.Equal(t, *metric.Metric[0].Label[0].Value, "Test.Method")