mirror of https://github.com/apache/cloudstack.git
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 <gaurav.aradhye@clogeny.com> This closes #356
This commit is contained in:
parent
93845afd53
commit
0326fb3b5c
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue