cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prasanna Santhanam <...@apache.org>
Subject [PATCH] CLOUDSTACK-4437: Fix iso usage event count to match the number of image stores
Date Thu, 22 Aug 2013 07:07:45 GMT
Please apply on 4.2. cherry-pick from 502b2ff0f

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
---
 test/integration/component/test_project_usage.py |    5 +++--
 test/integration/component/test_usage.py         |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py
index 1422feb..e836768 100644
--- a/test/integration/component/test_project_usage.py
+++ b/test/integration/component/test_project_usage.py
@@ -970,16 +970,17 @@ class TestISOUsage(cloudstackTestCase):
         qresult = str(qresultset)
         self.debug("Query result: %s" % qresult)
 
+        imageStores = ImageStore.list(self.api_client,zoneid=self.zone.id)
         # Check for ISO.CREATE, ISO.DELETE events in cloud.usage_event table
         self.assertEqual(
                             qresult.count('ISO.CREATE'),
-                            1,
+                            len(imageStores),
                             "Check ISO.CREATE event in events table"
                         )
 
         self.assertEqual(
                             qresult.count('ISO.DELETE'),
-                            1,
+                            len(imageStores),
                             "Check ISO.DELETE in events table"
                         )
         return
diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py
index 5a42559..75326f7 100644
--- a/test/integration/component/test_usage.py
+++ b/test/integration/component/test_usage.py
@@ -904,17 +904,17 @@ class TestISOUsage(cloudstackTestCase):
 
         qresult = str(qresultset)
         self.debug("Query result: %s" % qresult)
-
+        imageStores = ImageStore.list(self.api_client,zoneid=self.zone.id)
         # Check for ISO.CREATE, ISO.DELETE events in cloud.usage_event table
         self.assertEqual(
                             qresult.count('ISO.CREATE'),
-                            1,
+                            len(imageStores),
                             "Check ISO.CREATE event in events table"
                         )
 
         self.assertEqual(
                             qresult.count('ISO.DELETE'),
-                            1,
+                            len(imageStores),
                             "Check ISO.DELETE in events table"
                         )
         return
-- 
1.7.10.2 (Apple Git-33)


-- 
Prasanna.,

------------------------
Powered by BigRock.com


Mime
View raw message