You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2015/01/05 14:12:44 UTC
[07/10] git commit: updated refs/heads/master to 22d6565
CLOUDSTACK-8132: Fixed issue related to secondary storage count of template
Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f938a5e1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f938a5e1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f938a5e1
Branch: refs/heads/master
Commit: f938a5e1c352971aa61e75a60935c735c3d3920c
Parents: 17da2e9
Author: Ashutosh K <as...@clogeny.com>
Authored: Mon Dec 29 03:34:37 2014 -0800
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Mon Jan 5 18:30:16 2015 +0530
----------------------------------------------------------------------
test/integration/component/test_ss_limits.py | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f938a5e1/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 22ab99c..32201d8 100644
--- a/test/integration/component/test_ss_limits.py
+++ b/test/integration/component/test_ss_limits.py
@@ -127,7 +127,7 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
except Exception as e:
return [FAIL, e]
return [PASS, None]
-
+
@data(ROOT_DOMAIN_ADMIN, CHILD_DOMAIN_ADMIN)
@attr(tags = ["advanced"], required_hardware="true")
def test_01_register_template(self, value):
@@ -144,24 +144,28 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
response = self.setupAccount(value)
self.assertEqual(response[0], PASS, response[1])
+ apiclient = self.testClient.getUserApiClient(
+ UserName=self.account.name,
+ DomainName=self.account.domain)
+
builtin_info = get_builtin_template_info(self.apiclient, self.zone.id)
self.services["template_2"]["url"] = builtin_info[0]
self.services["template_2"]["hypervisor"] = builtin_info[1]
self.services["template_2"]["format"] = builtin_info[2]
try:
- template = Template.register(self.apiclient,
+ template = Template.register(apiclient,
self.services["template_2"],
zoneid=self.zone.id,
account=self.account.name,
domainid=self.account.domainid,
hypervisor=self.hypervisor)
- template.download(self.apiclient)
+ template.download(apiclient)
except Exception as e:
self.fail("Failed to register template: %s" % e)
- templates = Template.list(self.apiclient,
+ templates = Template.list(apiclient,
templatefilter=\
self.services["template_2"]["templatefilter"],
id=template.id)
@@ -171,19 +175,19 @@ class TestSecondaryStorageLimits(cloudstackTestCase):
templateSize = (templates[0].size / (1024**3))
expectedCount = templateSize
response = matchResourceCount(
- self.apiclient, expectedCount,
+ apiclient, expectedCount,
RESOURCE_SECONDARY_STORAGE,
accountid=self.account.id)
self.assertEqual(response[0], PASS, response[1])
try:
- template.delete(self.apiclient)
+ template.delete(apiclient)
except Exception as e:
self.fail("Failed to delete template: %s" % e)
expectedCount = 0
response = matchResourceCount(
- self.apiclient, expectedCount,
+ apiclient, expectedCount,
RESOURCE_SECONDARY_STORAGE,
accountid=self.account.id)
self.assertEqual(response[0], PASS, response[1])