make code compatible with go 1.6
This commit is contained in:
parent
685a3c90d4
commit
555018f3c9
|
@ -78,10 +78,6 @@ func TestCounterVecGetMetricWithInvalidLabelValues(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
test := test
|
||||
t.Run(test.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
counterVec := NewCounterVec(CounterOpts{
|
||||
Name: "test",
|
||||
}, []string{"a"})
|
||||
|
@ -104,7 +100,6 @@ func TestCounterVecGetMetricWithInvalidLabelValues(t *testing.T) {
|
|||
if _, err := counterVec.GetMetricWith(test.labels); err == nil {
|
||||
t.Errorf("GetMetricWith: expected error because: %s", test.desc)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,10 +25,6 @@ func TestNewConstMetricInvalidLabelValues(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
test := test
|
||||
t.Run(test.desc, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
metricDesc := NewDesc(
|
||||
"sample_value",
|
||||
"sample value",
|
||||
|
@ -43,6 +39,5 @@ func TestNewConstMetricInvalidLabelValues(t *testing.T) {
|
|||
if _, err := NewConstMetric(metricDesc, CounterValue, 0.3, "\xFF"); err == nil {
|
||||
t.Errorf("NewConstMetric: expected error because: %s", test.desc)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue