CLOUDSTACK-4437: Fix iso usage event count to match the number of image stores

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 502b2ff0f90f5b0e8741335643f7710ce650633f)
This commit is contained in:
SrikanteswaraRao Talluri 2013-08-22 11:15:47 +05:30 committed by Prasanna Santhanam
parent 197108c6a3
commit c36cf73cfb
2 changed files with 6 additions and 5 deletions

View File

@ -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

View File

@ -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