From 0326fb3b5ca0c1cc0ff1709b713d725ea38a7748 Mon Sep 17 00:00:00 2001 From: pritisarap12 Date: Fri, 5 Jun 2015 11:52:34 +0530 Subject: [PATCH] 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 This closes #356 --- .../maint/testpath_disable_enable_zone.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/integration/component/maint/testpath_disable_enable_zone.py b/test/integration/component/maint/testpath_disable_enable_zone.py index 91b31f0c824..ec7c059d2c9 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,