lint:ignore U1000 // this is used but only in unittests which are excluded by the integration build tag
(name string, expectedMin int, expectedMax int)
| 93 | |
| 94 | //lint:ignore U1000 // this is used but only in unittests which are excluded by the integration build tag |
| 95 | func minMaxHistogramValidator(name string, expectedMin int, expectedMax int) *metricValidator { |
| 96 | return histogramValidator(name, func(t *testing.T, histogram metrics.Histogram) { |
| 97 | t.Helper() |
| 98 | min := int(histogram.Min()) |
| 99 | if min != expectedMin { |
| 100 | t.Errorf("Expected histogram metric '%s' min = %d, got %d", name, expectedMin, min) |
| 101 | } |
| 102 | max := int(histogram.Max()) |
| 103 | if max != expectedMax { |
| 104 | t.Errorf("Expected histogram metric '%s' max = %d, got %d", name, expectedMax, max) |
| 105 | } |
| 106 | }) |
| 107 | } |
| 108 | |
| 109 | func counterValidator(name string, expectedCount int) *metricValidator { |
| 110 | return &metricValidator{ |
no test coverage detected