mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
Fix checksum integer overflow in metrics
This commit is contained in:
parent
29eee409ef
commit
087f8fe84f
4 changed files with 23 additions and 13 deletions
|
@ -36,7 +36,15 @@ func testDataRetrieval(v *view.View, t *testing.T, want string) {
|
|||
}
|
||||
}
|
||||
|
||||
func testMetricRetrieval(metrics []*metricdata.Metric, t *testing.T, labels []metricdata.LabelValue, value int64, name string) {
|
||||
func testMetricRetrieval(metrics []*metricdata.Metric, t *testing.T, labels []metricdata.LabelValue, value interface{}, name string) {
|
||||
switch value.(type) {
|
||||
case int64:
|
||||
case float64:
|
||||
case uint64:
|
||||
default:
|
||||
t.Errorf("Got an unexpected type for value: %T", value)
|
||||
}
|
||||
|
||||
found := false
|
||||
for _, metric := range metrics {
|
||||
if metric.Descriptor.Name != name {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue