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

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
SrikanteswaraRao Talluri 2013-08-22 11:15:47 +05:30 committed by Prasanna Santhanam
parent e2122b7230
commit 64460df554
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