Repository: cloudstack
Updated Branches:
  refs/heads/master 47365ac4b -> 396f29c13


CLOUDSTACK-7441: Fixed tempalte register issue in test_resource_limits.py

Signed-off-by: SrikanteswaraRao Talluri <tall...@apache.org>


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

Branch: refs/heads/master
Commit: 396f29c135e3f384218400a1f64c63a6dbb2a76d
Parents: 47365ac
Author: Gaurav Aradhye <gaurav.arad...@clogeny.com>
Authored: Wed Sep 3 11:43:31 2014 +0530
Committer: SrikanteswaraRao Talluri <tall...@apache.org>
Committed: Wed Sep 3 12:17:08 2014 +0530

----------------------------------------------------------------------
 test/integration/component/test_resource_limits.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/396f29c1/test/integration/component/test_resource_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_resource_limits.py 
b/test/integration/component/test_resource_limits.py
index b4ef4dc..35128b4 100644
--- a/test/integration/component/test_resource_limits.py
+++ b/test/integration/component/test_resource_limits.py
@@ -748,6 +748,13 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         #    able to create template without any error
 
         try:
+            apiclient_account1 = self.testClient.getUserApiClient(
+                                      UserName=self.account_1.name,
+                                      DomainName=self.account_1.domain)
+
+            apiclient_account2 = self.testClient.getUserApiClient(
+                                      UserName=self.account_2.name,
+                                      DomainName=self.account_2.domain)
             self.debug(
                        "Updating template resource limit for account: %s" %
                                                 self.account_1.name)
@@ -818,7 +825,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                 "Creating template from volume: %s" % volume.id)
             # Create a template from the ROOTDISK (Account 1)
             template_1 = Template.create(
-                            self.apiclient,
+                            apiclient_account1,
                             self.services["template"],
                             volumeid=volume.id,
                             account=self.account_1.name,
@@ -837,7 +844,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
         # Exception should be raised for second snapshot (account_1)
         with self.assertRaises(Exception):
             Template.create(
-                            self.apiclient,
+                            apiclient_account1,
                             self.services["template"],
                             volumeid=volume.id,
                             account=self.account_1.name,
@@ -864,7 +871,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                 "Creating template from volume: %s" % volume.id)
             # Create a snapshot from the ROOTDISK (Account 1)
             template_2 = Template.create(
-                            self.apiclient,
+                            apiclient_account2,
                             self.services["template"],
                             volumeid=volume.id,
                             account=self.account_2.name,
@@ -882,7 +889,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
                 "Creating template from volume: %s" % volume.id)
             # Create a second volume from the ROOTDISK (Account 2)
             template_3 = Template.create(
-                            self.apiclient,
+                            apiclient_account2,
                             self.services["template"],
                             volumeid=volume.id,
                             account=self.account_2.name,

Reply via email to