Skip to content

Commit 5a62a37

Browse files
committed
use snake case for catalogsource_ready metric
1 parent 691a373 commit 5a62a37

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/metrics/metrics.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ var (
144144

145145
catalogSourceReady = prometheus.NewGaugeVec(
146146
prometheus.GaugeOpts{
147-
Name: "catalogSource_ready",
147+
Name: "catalogsource_ready",
148148
Help: "State of a CatalogSource. 1 indicates that the CatalogSource is in a READY state. 0 indicates CatalogSource is in a Non READY state.",
149149
},
150150
[]string{NAMESPACE_LABEL, NAME_LABEL},

test/e2e/metrics_e2e_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
316316
WithValueGreaterThan(0),
317317
)),
318318
ContainElement(LikeMetric(
319-
WithFamily("catalogSource_ready"),
319+
WithFamily("catalogsource_ready"),
320320
WithName(name),
321321
WithNamespace(testNamespace),
322322
WithValue(1),
@@ -332,7 +332,7 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
332332
return getMetricsFromPod(c, getPodWithLabel(c, "app=catalog-operator"), "8081")
333333
}).Should(And(
334334
Not(ContainElement(LikeMetric(
335-
WithFamily("catalogSource_ready"),
335+
WithFamily("catalogsource_ready"),
336336
WithName(name),
337337
WithNamespace(testNamespace),
338338
)))))
@@ -356,7 +356,7 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
356356
return getMetricsFromPod(c, getPodWithLabel(c, "app=catalog-operator"), "8081")
357357
}).Should(And(
358358
ContainElement(LikeMetric(
359-
WithFamily("catalogSource_ready"),
359+
WithFamily("catalogsource_ready"),
360360
WithName(name),
361361
WithNamespace(testNamespace),
362362
WithValue(0),
@@ -366,7 +366,7 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
366366
return getMetricsFromPod(c, getPodWithLabel(c, "app=catalog-operator"), "8081")
367367
}, "3m").Should(And(
368368
ContainElement(LikeMetric(
369-
WithFamily("catalogSource_ready"),
369+
WithFamily("catalogsource_ready"),
370370
WithName(name),
371371
WithNamespace(testNamespace),
372372
WithValue(0),

0 commit comments

Comments
 (0)