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