mirror of
https://github.com/prometheus/prometheus
synced 2025-01-05 14:10:56 +00:00
improve new scrape test
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
parent
4503145c8b
commit
0a321fe4d8
@ -3464,6 +3464,12 @@ test_histogram_count{address="0.0.0.0",port="5001"} 1
|
||||
series = q.Select(ctx, false, nil, labels.MustNewMatcher(labels.MatchRegexp, "__name__", "test_histogram"))
|
||||
count := 0
|
||||
for series.Next() {
|
||||
i := series.At().Iterator(nil)
|
||||
for i.Next() == chunkenc.ValHistogram {
|
||||
_, h := i.AtHistogram(nil)
|
||||
require.Equal(t, uint64(1), h.Count)
|
||||
require.Equal(t, 10.0, h.Sum)
|
||||
}
|
||||
count++
|
||||
}
|
||||
require.Equal(t, 1, count, "number of series not as expected")
|
||||
|
Loading…
Reference in New Issue
Block a user