Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Tuduri <[email protected]>
  • Loading branch information
marctc committed May 31, 2023
1 parent c45f817 commit 595a6a3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions collector/collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 595a6a3

Please sign in to comment.