diff --git a/core/emetric/counter_test.go b/core/emetric/counter_test.go index 0744b3f9..d7c953d4 100644 --- a/core/emetric/counter_test.go +++ b/core/emetric/counter_test.go @@ -10,7 +10,7 @@ import ( func TestCounterVec(t *testing.T) { name := "test" - label := []string{"hello", "world"} + labels := []string{"hello", "world"} mockCounterVec := &prometheus.CounterVec{} vec := func(opts prometheus.GaugeOpts, labels []string) *prometheus.CounterVec { @@ -21,12 +21,11 @@ func TestCounterVec(t *testing.T) { Help: "test", ConstLabels: map[string]string{"hello": "world"}, } - labels = []string{"hello", "world"} assert.Equal(t, "ego", opts.Namespace) assert.Equal(t, name, opts.Name) assert.Equal(t, name, opts.Help) return mockCounterVec } - out := NewCounterVec(name, label) + out := NewCounterVec(name, labels) reflect.DeepEqual(vec, out.CounterVec) } diff --git a/core/emetric/gauge_test.go b/core/emetric/gauge_test.go index 5553bcfe..a8bef359 100644 --- a/core/emetric/gauge_test.go +++ b/core/emetric/gauge_test.go @@ -10,7 +10,7 @@ import ( func TestNewGaugeVec(t *testing.T) { name := "test_" - label := []string{"hello_", "world_"} + labels := []string{"hello_", "world_"} mockGaugeVec := &prometheus.GaugeVec{} vec := func(opts prometheus.GaugeOpts, labels []string) *prometheus.GaugeVec { @@ -21,12 +21,11 @@ func TestNewGaugeVec(t *testing.T) { Help: "test_", ConstLabels: map[string]string{"hello": "world"}, } - labels = []string{"hello_", "world_"} assert.Equal(t, DefaultNamespace, opts.Namespace) assert.Equal(t, name, opts.Name) assert.Equal(t, name, opts.Help) return mockGaugeVec } - out := NewGaugeVec(name, label) + out := NewGaugeVec(name, labels) reflect.DeepEqual(vec, out.GaugeVec) }