Commit 1a28205c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: fix test to follow up changes on bt5

parent 731b7feb
...@@ -703,8 +703,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -703,8 +703,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
<parameter id='mode'>unique_by_network</parameter> <parameter id='mode'>unique_by_network</parameter>
</instance>""" </instance>"""
self._makeTree() self._makeTree()
computer1, partition1 = self._makeComputer() computer1 = self._makeComputer()[0]
computer2, partition2 = self._makeComputer() computer2 = self._makeComputer()[0]
self._installSoftware(computer1, self.software_instance.getUrlString()) self._installSoftware(computer1, self.software_instance.getUrlString())
self._installSoftware(computer2, self.software_instance.getUrlString()) self._installSoftware(computer2, self.software_instance.getUrlString())
...@@ -735,8 +735,11 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -735,8 +735,11 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
software_instance2.validate() software_instance2.validate()
self.tic() self.tic()
self.software_instance.setSlaXml(sla_xml) self.software_instance.setSlaXml(sla_xml)
self.software_instance.SoftwareInstance_tryToAllocatePartition() self.software_instance.SoftwareInstance_tryToAllocatePartition()
self.tic()
self.assertEqual( self.assertEqual(
computer_network.getReference(), computer_network.getReference(),
self.software_instance.getAggregateValue(portal_type='Computer Partition')\ self.software_instance.getAggregateValue(portal_type='Computer Partition')\
...@@ -767,7 +770,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -767,7 +770,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
</instance>""" </instance>"""
self._makeTree() self._makeTree()
computer1, partition1 = self._makeComputer() computer1, partition1 = self._makeComputer()
computer2, partition2 = self._makeComputer() computer2 = self._makeComputer()[0]
computer3, partition3 = self._makeComputer() computer3, partition3 = self._makeComputer()
computer_network1 = self._makeComputerNetwork() computer_network1 = self._makeComputerNetwork()
computer_network2 = self._makeComputerNetwork() computer_network2 = self._makeComputerNetwork()
...@@ -905,8 +908,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -905,8 +908,8 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
<parameter id='mode'>unique_by_network</parameter> <parameter id='mode'>unique_by_network</parameter>
</instance>""" </instance>"""
self._makeTree() self._makeTree()
computer1, partition1 = self._makeComputer() computer1 = self._makeComputer()[0]
computer2, partition2 = self._makeComputer() computer2 = self._makeComputer()[0]
self._installSoftware(computer1, self.software_instance.getUrlString()) self._installSoftware(computer1, self.software_instance.getUrlString())
self._installSoftware(computer2, self.software_instance.getUrlString()) self._installSoftware(computer2, self.software_instance.getUrlString())
...@@ -1843,7 +1846,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin): ...@@ -1843,7 +1846,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin):
'error_message': '', 'error_message': '',
'actor': 'ERP5TypeTestCase', 'actor': 'ERP5TypeTestCase',
'slap_state': '', 'slap_state': '',
'time': addToDate(DateTime(), to_add={'day': -6}), 'time': addToDate(DateTime(), to_add={'day': -2}),
'action': 'edit' 'action': 'edit'
}) })
...@@ -1873,7 +1876,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin): ...@@ -1873,7 +1876,7 @@ class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(testSlapOSMixin):
'error_message': '', 'error_message': '',
'actor': 'ERP5TypeTestCase', 'actor': 'ERP5TypeTestCase',
'slap_state': '', 'slap_state': '',
'time': addToDate(DateTime(), to_add={'day': -8}), 'time': addToDate(DateTime(), to_add={'day': -4}),
'action': 'edit' 'action': 'edit'
}) })
...@@ -2065,7 +2068,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -2065,7 +2068,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
def test_alarm_software_instance_invalidated(self): def test_alarm_software_instance_invalidated(self):
instance = self.createSoftwareInstance() instance = self.createSoftwareInstance()
partition = self.createComputerPartition() self.createComputerPartition()
self.portal.portal_workflow._jumpToStateFor(instance, 'invalidated') self.portal.portal_workflow._jumpToStateFor(instance, 'invalidated')
self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested') self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested')
self.tic() self.tic()
...@@ -2083,7 +2086,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S ...@@ -2083,7 +2086,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by S
def test_alarm_software_instance_matching(self): def test_alarm_software_instance_matching(self):
instance = self.createSoftwareInstance() instance = self.createSoftwareInstance()
partition = self.createComputerPartition() self.createComputerPartition()
self.portal.portal_workflow._jumpToStateFor(instance, 'validated') self.portal.portal_workflow._jumpToStateFor(instance, 'validated')
self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested') self.portal.portal_workflow._jumpToStateFor(instance, 'destroy_requested')
self.tic() self.tic()
......
...@@ -6,10 +6,22 @@ ...@@ -6,10 +6,22 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>testSlapOSCloudAlarm</string> </value> <value> <string>testSlapOSCloudAlarm</string> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>test.erp5.testSlapOSCloudAlarm</string> </value> <value> <string>test.erp5.testSlapOSCloudAlarm</string> </value>
...@@ -27,23 +39,13 @@ ...@@ -27,23 +39,13 @@
<item> <item>
<key> <string>text_content_error_message</string> </key> <key> <string>text_content_error_message</string> </key>
<value> <value>
<tuple> <tuple/>
<string>E:1689, 2: method already defined line 1678 (function-redefined)</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple/>
<string>W:706, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:707, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:770, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:908, 15: Unused variable \'partition1\' (unused-variable)</string>
<string>W:909, 15: Unused variable \'partition2\' (unused-variable)</string>
<string>W:2079, 4: Unused variable \'partition\' (unused-variable)</string>
<string>W:2097, 4: Unused variable \'partition\' (unused-variable)</string>
</tuple>
</value> </value>
</item> </item>
<item> <item>
...@@ -53,13 +55,28 @@ ...@@ -53,13 +55,28 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -72,7 +89,7 @@ ...@@ -72,7 +89,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -81,7 +98,7 @@ ...@@ -81,7 +98,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
......
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