test: checking runtime count for pods

This commit is contained in:
Dario Tranchitella
2021-05-14 13:55:51 +02:00
parent 82ae78b704
commit d5af190c51
+3 -3
View File
@@ -178,10 +178,10 @@ var _ = Describe("exceeding a Tenant resource quota", func() {
}, defaultTimeoutInterval, defaultPollInterval).Should(Succeed())
})
By("ensuring the status has been blocked with actual usage", func() {
Eventually(func() corev1.ResourceList {
Eventually(func() bool {
_ = k8sClient.Get(context.TODO(), types.NamespacedName{Name: n, Namespace: ns}, rq)
return rq.Status.Hard
}, defaultTimeoutInterval, defaultPollInterval).Should(Equal(rq.Status.Used))
return rq.Status.Hard.Pods().String() == rq.Status.Used.Pods().String()
}, defaultTimeoutInterval, defaultPollInterval).Should(BeTrue())
})
By("creating an exceeded Pod", func() {
pod := &corev1.Pod{