Skip to content

Commit 4b4deb7

Browse files
author
Paolo Velati
committed
Pass an explicit context in the dashboard test
staticcheck SA1012: collector.New tolerates a nil context, but passing one is still wrong. Caught by make lint after the dashboard test was added.
1 parent 768d6c1 commit 4b4deb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dashboards_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var exporterMetric = regexp.MustCompile(`\b(?:port|poe|exporter)_[a-z0-9_]+\b`)
3535
func exposedMetrics(t *testing.T) map[string]bool {
3636
t.Helper()
3737

38-
c := collector.New(nil, collector.Options{
38+
c := collector.New(context.Background(), collector.Options{
3939
Client: staticClient{},
4040
PoE: true,
4141
})

0 commit comments

Comments
 (0)