CLOUDSTACK-8048: Fix test_ss_limits.py

Signed-off-by: SrikanteswaraRao Talluri <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e22cc6e9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e22cc6e9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e22cc6e9

Branch: refs/heads/master
Commit: e22cc6e9409a54858f3ffd803fcdde55e75ee8c6
Parents: b23fd5e
Author: Gaurav Aradhye <[email protected]>
Authored: Tue Dec 9 10:56:03 2014 +0530
Committer: SrikanteswaraRao Talluri <[email protected]>
Committed: Tue Dec 9 18:54:14 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_ss_limits.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e22cc6e9/test/integration/component/test_ss_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_ss_limits.py 
b/test/integration/component/test_ss_limits.py
index 4d6efc4..c83a7f5 100644
--- a/test/integration/component/test_ss_limits.py
+++ b/test/integration/component/test_ss_limits.py
@@ -233,7 +233,14 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
         except Exception as e:
             self.fail("Failed to create template: %s" % e)
 
-        templateSize = (template.size / (1024**3))
+        templates = Template.list(apiclient,
+                                  templatefilter=\
+                                  
self.services["template_2"]["templatefilter"],
+                                  id=template.id)
+        self.assertEqual(validateList(templates)[0],PASS,\
+                        "templates list validation failed")
+
+        templateSize = (templates[0].size / (1024**3))
         response = matchResourceCount(self.apiclient, templateSize,
                                       resourceType=RESOURCE_SECONDARY_STORAGE,
                                       accountid=self.account.id)

Reply via email to