Skip to content

Commit dfa402f

Browse files
committed
fix e2e CSV metric is preserved failure
Signed-off-by: akihikokuroda <[email protected]>
1 parent b414e6e commit dfa402f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Diff for: test/e2e/metrics_e2e_test.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,13 @@ var _ = Describe("Metrics are generated for OLM managed resources", func() {
149149
restartDeploymentWithLabel(c, "app=olm-operator")
150150
})
151151
It("CSV metric is preserved", func() {
152-
Expect(getMetricsFromPod(c, getPodWithLabel(c, "app=olm-operator"))).To(
153-
ContainElement(LikeMetric(WithFamily("csv_succeeded"), WithName(csv.Name), WithValue(1))),
154-
)
152+
Eventually(func() []Metric {
153+
return getMetricsFromPod(c, getPodWithLabel(c, "app=olm-operator"))
154+
}).Should(ContainElement(LikeMetric(
155+
WithFamily("csv_succeeded"),
156+
WithName(csv.Name),
157+
WithValue(1),
158+
)))
155159
})
156160
})
157161
})
@@ -567,6 +571,7 @@ func getMetricsFromPod(client operatorclient.ClientInterface, pod *corev1.Pod) [
567571
m.Value = c.GetValue()
568572
}
569573
metrics = append(metrics, m)
574+
fmt.Printf("metrics %+v\n", m)
570575
}
571576
}
572577
return metrics

0 commit comments

Comments
 (0)