diff --git a/collector/collector_test.go b/collector/collector_test.go index c424d8a9..a6edc5d0 100644 --- a/collector/collector_test.go +++ b/collector/collector_test.go @@ -22,7 +22,7 @@ import ( kingpin "github.com/alecthomas/kingpin/v2" "github.com/go-kit/log" "github.com/gosnmp/gosnmp" - "github.com/prometheus/client_model/go" + io_prometheus_client "github.com/prometheus/client_model/go" "github.com/prometheus/snmp_exporter/config" ) @@ -517,7 +517,7 @@ func TestPduToSample(t *testing.T) { } for _, c := range cases { - metrics := pduToSamples(c.indexOids, c.pdu, c.metric, c.oidToPdu, log.NewNopLogger()) + metrics := pduToSamples(c.indexOids, c.pdu, c.metric, c.oidToPdu, log.NewNopLogger(), internalMetrics{}) metric := &io_prometheus_client.Metric{} expected := map[string]struct{}{} for _, e := range c.expectedMetrics { @@ -720,7 +720,7 @@ func TestPduValueAsString(t *testing.T) { }, } for _, c := range cases { - got := pduValueAsString(c.pdu, c.typ) + got := pduValueAsString(c.pdu, c.typ, internalMetrics{}) if !reflect.DeepEqual(got, c.result) { t.Errorf("pduValueAsString(%v, %q): got %q, want %q", c.pdu, c.typ, got, c.result) } @@ -1007,7 +1007,7 @@ func TestIndexesToLabels(t *testing.T) { }, } for _, c := range cases { - got := indexesToLabels(c.oid, &c.metric, c.oidToPdu) + got := indexesToLabels(c.oid, &c.metric, c.oidToPdu, internalMetrics{}) if !reflect.DeepEqual(got, c.result) { t.Errorf("indexesToLabels(%v, %v, %v): got %v, want %v", c.oid, c.metric, c.oidToPdu, got, c.result) } @@ -1058,7 +1058,7 @@ func TestFilterAllowedIndices(t *testing.T) { }, } for _, c := range cases { - got := filterAllowedIndices(log.NewNopLogger(), c.filter, pdus, c.allowedList) + got := filterAllowedIndices(log.NewNopLogger(), c.filter, pdus, c.allowedList, internalMetrics{}) if !reflect.DeepEqual(got, c.result) { t.Errorf("filterAllowedIndices(%v): got %v, want %v", c.filter, got, c.result) }