99
1010 "ghcr-exporter/internal/config"
1111 "ghcr-exporter/internal/metrics"
12+
1213 promexporter_config "github.com/d0ugal/promexporter/config"
1314 promexporter_metrics "github.com/d0ugal/promexporter/metrics"
1415 "github.com/prometheus/client_golang/prometheus"
@@ -111,7 +112,7 @@ func TestGHCRCollectorIntegration(t *testing.T) {
111112 t .Logf ("Collection failed metric: %f" , collectionFailedMetric )
112113
113114 collectionSuccessMetric := testutil .ToFloat64 (registry .CollectionSuccessCounter .With (prometheus.Labels {
114- "repo" : "d0ugal-filesystem-exporter" ,
115+ "repo" : "d0ugal-filesystem-exporter" ,
115116 "interval" : "30" ,
116117 }))
117118 t .Logf ("Collection success metric: %f" , collectionSuccessMetric )
@@ -154,7 +155,7 @@ func TestGHCRCollectorLabelConsistency(t *testing.T) {
154155 description : "Should accept 'repo' and 'interval' labels" ,
155156 },
156157 {
157- name : "CollectionSuccessCounter" ,
158+ name : "CollectionSuccessCounter" ,
158159 metric : registry .CollectionSuccessCounter ,
159160 labels : prometheus.Labels {"repo" : "test-repo" , "interval" : "30" },
160161 description : "Should accept 'repo' and 'interval' labels" ,
@@ -166,13 +167,13 @@ func TestGHCRCollectorLabelConsistency(t *testing.T) {
166167 // This will panic if labels don't match the metric definition
167168 counter := tc .metric .With (tc .labels )
168169 counter .Inc ()
169-
170+
170171 // Verify the metric was created successfully
171172 value := testutil .ToFloat64 (counter )
172173 if value != 1.0 {
173174 t .Errorf ("Expected metric value 1.0, got %f" , value )
174175 }
175-
176+
176177 t .Logf ("✅ %s: %s" , tc .name , tc .description )
177178 })
178179 }
@@ -227,13 +228,13 @@ func TestGHCRCollectorLabelConsistency(t *testing.T) {
227228 // This will panic if labels don't match the metric definition
228229 gauge := tc .metric .With (tc .labels )
229230 gauge .Set (42.0 )
230-
231+
231232 // Verify the metric was created successfully
232233 value := testutil .ToFloat64 (gauge )
233234 if value != 42.0 {
234235 t .Errorf ("Expected metric value 42.0, got %f" , value )
235236 }
236-
237+
237238 t .Logf ("✅ %s: %s" , tc .name , tc .description )
238239 })
239240 }
0 commit comments