From 64460df554343a73e956af589d2215e217d7e511 Mon Sep 17 00:00:00 2001 From: SrikanteswaraRao Talluri Date: Thu, 22 Aug 2013 11:15:47 +0530 Subject: [PATCH] CLOUDSTACK-4437: Fix iso usage event count to match the number of image stores Signed-off-by: Prasanna Santhanam --- 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 1422febf975..e836768591b 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 5a425590c41..75326f70a75 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