Skip to content

Commit bd3d899

Browse files
committed
chore: cleanup TestGetStatus
1 parent aaa58c1 commit bd3d899

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

pkg/api/status_test.go

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/ethersphere/bee/v2/pkg/status"
1818
"github.com/ethersphere/bee/v2/pkg/storer"
1919
"github.com/ethersphere/bee/v2/pkg/topology"
20-
"github.com/prometheus/client_golang/prometheus"
2120
)
2221

2322
func TestGetStatus(t *testing.T) {
@@ -54,35 +53,14 @@ func TestGetStatus(t *testing.T) {
5453
committedDepth: ssr.CommittedDepth,
5554
}
5655

57-
metricsRegistry := prometheus.NewRegistry()
58-
59-
h := prometheus.NewHistogram(prometheus.HistogramOpts{
60-
Namespace: "test",
61-
Name: "response_duration_seconds",
62-
Help: "Histogram of API response durations.",
63-
Buckets: []float64{0.01, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
64-
ConstLabels: prometheus.Labels{
65-
"test": "label",
66-
},
67-
})
68-
69-
metricsRegistry.MustRegister(h)
70-
71-
points := []float64{0.25, 5.2, 1.5, 1, 5.2, 0, 65}
72-
var sum float64
73-
for _, p := range points {
74-
h.Observe(p)
75-
sum += p
76-
}
77-
7856
statusSvc := status.NewService(
7957
log.Noop,
8058
nil,
8159
new(topologyPeersIterNoopMock),
8260
mode.String(),
8361
ssMock,
8462
ssMock,
85-
metricsRegistry,
63+
nil,
8664
)
8765

8866
statusSvc.SetSync(ssMock)

0 commit comments

Comments
 (0)