File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
29
29
"github.com/fluxcd/pkg/ssa"
30
30
. "github.com/onsi/gomega"
31
+ "github.com/prometheus/client_golang/prometheus"
31
32
"github.com/sethvargo/go-limiter/memorystore"
32
33
prommetrics "github.com/slok/go-http-metrics/metrics/prometheus"
33
34
"github.com/slok/go-http-metrics/middleware"
@@ -168,9 +169,12 @@ func TestAlertReconciler_EventHandler(t *testing.T) {
168
169
)
169
170
g .Expect (createNamespace (namespace )).NotTo (HaveOccurred (), "failed to create test namespace" )
170
171
172
+ reg := prometheus .NewRegistry ()
173
+
171
174
eventMdlw := middleware .New (middleware.Config {
172
175
Recorder : prommetrics .NewRecorder (prommetrics.Config {
173
- Prefix : "gotk_event" ,
176
+ Prefix : "gotk_event" ,
177
+ Registry : reg ,
174
178
}),
175
179
})
176
180
@@ -434,9 +438,12 @@ func TestAlertReconciler_EventHandler_CrossNamespaceRefs(t *testing.T) {
434
438
)
435
439
g .Expect (createNamespace (namespace )).NotTo (HaveOccurred (), "failed to create test namespace" )
436
440
441
+ reg := prometheus .NewRegistry ()
442
+
437
443
eventMdlw := middleware .New (middleware.Config {
438
444
Recorder : prommetrics .NewRecorder (prommetrics.Config {
439
- Prefix : "gotk_event" ,
445
+ Prefix : "gotk_event" ,
446
+ Registry : reg ,
440
447
}),
441
448
})
442
449
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ require (
24
24
github.com/ktrysmt/go-bitbucket v0.9.55
25
25
github.com/microsoft/azure-devops-go-api/azuredevops/v6 v6.0.1
26
26
github.com/onsi/gomega v1.27.2
27
+ github.com/prometheus/client_golang v1.14.0
27
28
github.com/sethvargo/go-limiter v0.7.2
28
29
github.com/slok/go-http-metrics v0.10.0
29
30
github.com/spf13/pflag v1.0.5
@@ -110,7 +111,6 @@ require (
110
111
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
111
112
github.com/pkg/errors v0.9.1 // indirect
112
113
github.com/pmezard/go-difflib v1.0.0 // indirect
113
- github.com/prometheus/client_golang v1.14.0 // indirect
114
114
github.com/prometheus/client_model v0.3.0 // indirect
115
115
github.com/prometheus/common v0.37.0 // indirect
116
116
github.com/prometheus/procfs v0.8.0 // indirect
You can’t perform that action at this time.
0 commit comments