You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/07/24 13:24:12 UTC

[4/4] git commit: updated refs/heads/4.2 to 8e30ee3

Revert "CLOUDSTACK-3696: Test case test_project_limits.TestResourceLimitsProject.test_06_volumes_per_project failed due to volume usage exceeded for project."

Despite the patch the test fails. Removing the patch applied for testing
locally.

This reverts commit 605a31eb70e8998b4476ffadf2514c969b83f7d7.


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

Branch: refs/heads/4.2
Commit: 8e30ee3f1a6de50c7ae6599d62e53c291d443103
Parents: 4a7f5d5
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Wed Jul 24 16:52:59 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Wed Jul 24 16:52:59 2013 +0530

----------------------------------------------------------------------
 .../component/test_project_limits.py            | 60 ++++++--------------
 1 file changed, 18 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8e30ee3f/test/integration/component/test_project_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py
index db49122..6e3f41d 100644
--- a/test/integration/component/test_project_limits.py
+++ b/test/integration/component/test_project_limits.py
@@ -149,15 +149,10 @@ class TestProjectLimits(cloudstackTestCase):
                             cls.services["user"],
                             domainid=cls.domain.id
                             )
-        cls.disk_offering = DiskOffering.create(
-                                    cls.api_client,
-                                    cls.services["disk_offering"]
-                                    )
         cls._cleanup = [
             cls.admin,
             cls.user,
-            cls.domain,
-            cls.disk_offering
+            cls.domain
             ]
         return
 
@@ -199,8 +194,8 @@ class TestProjectLimits(cloudstackTestCase):
         #    account resource limits
         # 3. Increase Projects Resources limits above domains limit. Verify
         #    project can't have more resources than domain level limit allows.
-        # 4. Create Resource more than its set limit for the parent domain.
-        #    Verify resource allocation should fail giving proper message
+        # 4. Create Resource more than its set limit for a project. Verify
+        #    resource allocation should fail giving proper message
 
         # Create project as a domain admin
         project = Project.create(
@@ -314,41 +309,22 @@ class TestProjectLimits(cloudstackTestCase):
                                         self.apiclient,
                                         resource.resourcetype,
                                         domainid=self.domain.id,
-                                        max=1
+                                        max=2
+                                      )
+            with self.assertRaises(Exception):
+                max_value = 3
+                self.debug(
+                    "Attempting to update project: %s resource limit to: %s" % (
+                                                                project.id,
+                                                                max_value
+                                                                ))
+                # Update project resource limits to 3
+                update_resource_limit(
+                                        self.apiclient,
+                                        resource.resourcetype,
+                                        max=max_value,
+                                        projectid=project.id
                                       )
-            max_value = 2
-            self.debug(
-                "Attempting to update project: %s resource limit to: %s" % (
-                                                            project.id,
-                                                            max_value
-                                                            ))
-            # Update project resource limits to 3
-            update_resource_limit(
-                                    self.apiclient,
-                                    resource.resourcetype,
-                                    max=max_value,
-                                    projectid=project.id
-                                  )
-
-        # Verify project can't have more resources then limit set for domain by adding volumes.
-        volume = Volume.create(
-                          self.apiclient,
-                          self.services["volume"],
-                          zoneid=self.zone.id,
-                          diskofferingid=self.disk_offering.id,
-                          projectid=project.id
-                        )
-        # Exception should be raised for second volume
-        with self.assertRaises(Exception):
-            Volume.create(
-                          self.apiclient,
-                          self.services["volume"],
-                          zoneid=self.zone.id,
-                          diskofferingid=self.disk_offering.id,
-                          projectid=project.id
-                        )
-        volume.delete(self.apiclient);
-
         return
 
     @attr(tags=["advanced", "basic", "sg", "eip", "advancedns", "simulator"])