Skip to content

Commit 5cf1d5b

Browse files
akihikokurodaanik120
authored andcommitted
fix e2e CSV metric is preserved failure (#2530)
Signed-off-by: akihikokuroda <akihikokuroda2020@gmail.com>
1 parent 239c027 commit 5cf1d5b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/e2e/metrics_e2e_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,13 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
143143
restartDeploymentWithLabel(c, "app=olm-operator")
144144
})
145145
It("CSV metric is preserved", func() {
146-
Expect(getMetricsFromPod(c, getPodWithLabel(c, "app=olm-operator"))).To(
147-
ContainElement(LikeMetric(WithFamily("csv_succeeded"), WithName(csv.Name), WithValue(1))),
148-
)
146+
Eventually(func() []Metric {
147+
return getMetricsFromPod(c, getPodWithLabel(c, "app=olm-operator"))
148+
}).Should(ContainElement(LikeMetric(
149+
WithFamily("csv_succeeded"),
150+
WithName(csv.Name),
151+
WithValue(1),
152+
)))
149153
})
150154
})
151155
})

0 commit comments

Comments
 (0)