Commit 9939b971 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Fix Test! Don't invoke validate directly

  By invoking validate, the interaction workflow will be kicked and allocation will be triggered. In order to control the invocation order on the test, use portal_workflow API.
parent b0e2d545
...@@ -739,7 +739,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -739,7 +739,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
specialise=self.hosting_subscription.getRelativeUrl(), specialise=self.hosting_subscription.getRelativeUrl(),
) )
self.portal.portal_workflow._jumpToStateFor(software_instance2, 'start_requested') self.portal.portal_workflow._jumpToStateFor(software_instance2, 'start_requested')
software_instance2.validate() self.portal.portal_workflow._jumpToStateFor(software_instance2, 'validated')
self.tic() self.tic()
self.assertEqual(None, self.assertEqual(None,
...@@ -956,9 +956,10 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -956,9 +956,10 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
specialise=self.hosting_subscription.getRelativeUrl(), specialise=self.hosting_subscription.getRelativeUrl(),
) )
self.portal.portal_workflow._jumpToStateFor(software_instance2, 'start_requested') self.portal.portal_workflow._jumpToStateFor(software_instance2, 'start_requested')
software_instance2.validate() self.portal.portal_workflow._jumpToStateFor(software_instance2, 'validated')
self.tic() self.tic()
self.assertEqual(None, self.assertEqual(None,
self.software_instance.getAggregateValue(portal_type='Computer Partition')) self.software_instance.getAggregateValue(portal_type='Computer Partition'))
......
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