From d5af190c51152b987bf9919eb982db5f9a5f867c Mon Sep 17 00:00:00 2001 From: Dario Tranchitella Date: Fri, 14 May 2021 12:11:02 +0200 Subject: [PATCH] test: checking runtime count for pods --- e2e/resource_quota_exceeded_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/resource_quota_exceeded_test.go b/e2e/resource_quota_exceeded_test.go index 99f2232b..050cc15e 100644 --- a/e2e/resource_quota_exceeded_test.go +++ b/e2e/resource_quota_exceeded_test.go @@ -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{