Commit c9576208 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Tomáš Peterka

slapos_cloud: Make tests verbose more information

Pre-check if the instance is allocated before check if it was allocated on the right place. This problem seems unreproducible on a running instance.
parent 906ac729
......@@ -742,11 +742,23 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
software_instance2.validate()
self.tic()
self.assertEqual(None,
self.software_instance.getAggregateValue(portal_type='Computer Partition'))
self.assertEqual(self.software_instance.getSlapState(), 'start_requested')
self.assertEqual(self.software_instance.getValidationState(), 'validated')
self.software_instance.setSlaXml(sla_xml)
self.software_instance.SoftwareInstance_tryToAllocatePartition()
self.tic()
portal_workflow = self.software_instance.portal_workflow
last_workflow_item = portal_workflow.getInfoFor(ob=self.software_instance,
name='comment', wf_id='edit_workflow')
self.assertEqual(None,last_workflow_item)
self.assertNotEqual(None,
self.software_instance.getAggregateValue(portal_type='Computer Partition'))
self.assertEqual(
computer_network.getReference(),
self.software_instance.getAggregateValue(portal_type='Computer Partition')\
......@@ -947,9 +959,23 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
software_instance2.validate()
self.tic()
self.assertEqual(None,
self.software_instance.getAggregateValue(portal_type='Computer Partition'))
self.assertEqual(self.software_instance.getSlapState(), 'start_requested')
self.assertEqual(self.software_instance.getValidationState(), 'validated')
self.software_instance.setSlaXml(sla_xml)
self.software_instance.SoftwareInstance_tryToAllocatePartition()
software_instance2.SoftwareInstance_tryToAllocatePartition()
portal_workflow = self.software_instance.portal_workflow
last_workflow_item = portal_workflow.getInfoFor(ob=self.software_instance,
name='comment', wf_id='edit_workflow')
self.assertEqual(None,last_workflow_item)
self.assertNotEqual(None,
self.software_instance.getAggregateValue(portal_type='Computer Partition'))
# First is deployed
self.assertEqual(
computer_network.getReference(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment