You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ga...@apache.org on 2015/06/05 10:39:33 UTC

git commit: updated refs/heads/master to 0326fb3

Repository: cloudstack
Updated Branches:
  refs/heads/master 93845afd5 -> 0326fb3b5


CLOUDSTACK-8308: Updating Disable/enable host testpath as admin user should not be able to deploy vm on disabled host

Signed-off-by: Gaurav Aradhye <ga...@clogeny.com>
This closes #356


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

Branch: refs/heads/master
Commit: 0326fb3b5ca0c1cc0ff1709b713d725ea38a7748
Parents: 93845af
Author: pritisarap12 <pr...@clogeny.com>
Authored: Fri Jun 5 11:52:34 2015 +0530
Committer: Gaurav Aradhye <ga...@clogeny.com>
Committed: Fri Jun 5 14:08:56 2015 +0530

----------------------------------------------------------------------
 .../maint/testpath_disable_enable_zone.py       | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0326fb3b/test/integration/component/maint/testpath_disable_enable_zone.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/testpath_disable_enable_zone.py b/test/integration/component/maint/testpath_disable_enable_zone.py
index 91b31f0..ec7c059 100644
--- a/test/integration/component/maint/testpath_disable_enable_zone.py
+++ b/test/integration/component/maint/testpath_disable_enable_zone.py
@@ -1371,7 +1371,6 @@ class TestDisableEnableHost(cloudstackTestCase):
         cmd.resourcestate = DISABLED
         cmd.allocationstate = DISABLE
         self.apiclient.updateHost(cmd)
-
         self.disabledHosts.append(hostid)
 
         hostList = Host.list(self.apiclient, id=hostid)
@@ -1406,15 +1405,16 @@ class TestDisableEnableHost(cloudstackTestCase):
                          "stopped",
                          "verify that vm should stop")
 
-        VirtualMachine.create(
-            self.apiclient,
-            self.testdata["small"],
-            templateid=self.template.id,
-            accountid=self.account.name,
-            domainid=self.account.domainid,
-            serviceofferingid=self.service_offering.id,
-            zoneid=self.zone.id,
-            hostid=hostid)
+        with self.assertRaises(Exception):
+            VirtualMachine.create(
+                self.apiclient,
+                self.testdata["small"],
+                templateid=self.template.id,
+                accountid=self.account.name,
+                domainid=self.account.domainid,
+                serviceofferingid=self.service_offering.id,
+                zoneid=self.zone.id,
+                hostid=hostid)
 
         root_volume = list_volumes(
             self.apiclient,