File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ import (
5353 "github.com/fluxcd/source-controller/internal/cache"
5454 "github.com/fluxcd/source-controller/internal/features"
5555 "github.com/fluxcd/source-controller/internal/helm/registry"
56+ "github.com/fluxcd/source-controller/internal/helm/repository"
5657 "github.com/fluxcd/source-controller/pkg/git/libgit2/managed"
5758 // +kubebuilder:scaffold:imports
5859)
@@ -106,6 +107,7 @@ var (
106107var (
107108 testRegistryServer * registryClientTestServer
108109 testCache * cache.Cache
110+ testRepoRecorder * repository.Recorder
109111)
110112
111113func init () {
@@ -263,6 +265,7 @@ func TestMain(m *testing.M) {
263265
264266 testCache = cache .New (5 , 1 * time .Second )
265267 cacheRecorder := cache .MustMakeMetrics ()
268+ testRepoRecorder = repository .MustMakeMetrics ()
266269
267270 if err := (& OCIRepositoryReconciler {
268271 Client : testEnv ,
@@ -282,6 +285,7 @@ func TestMain(m *testing.M) {
282285 Cache : testCache ,
283286 TTL : 1 * time .Second ,
284287 CacheRecorder : cacheRecorder ,
288+ RepoRecorder : testRepoRecorder ,
285289 }).SetupWithManager (testEnv ); err != nil {
286290 panic (fmt .Sprintf ("Failed to start HelmRepositoryReconciler: %v" , err ))
287291 }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package main
1818
1919import (
2020 "fmt"
21+ "github.com/fluxcd/source-controller/internal/helm/repository"
2122 "net"
2223 "net/http"
2324 "os"
@@ -225,6 +226,8 @@ func main() {
225226 os .Exit (1 )
226227 }
227228
229+ repoRecorder := repository .MustMakeMetrics ()
230+
228231 if err = (& controllers.HelmRepositoryOCIReconciler {
229232 Client : mgr .GetClient (),
230233 EventRecorder : eventRecorder ,
@@ -270,6 +273,7 @@ func main() {
270273 Cache : c ,
271274 TTL : ttl ,
272275 CacheRecorder : cacheRecorder ,
276+ RepoRecorder : repoRecorder ,
273277 }).SetupWithManagerAndOptions (mgr , controllers.HelmRepositoryReconcilerOptions {
274278 MaxConcurrentReconciles : concurrent ,
275279 RateLimiter : helper .GetRateLimiter (rateLimiterOptions ),
You can’t perform that action at this time.
0 commit comments