Commit 02788922 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_pdm: Remove duplicated test.

parent 7377b316
...@@ -50,7 +50,6 @@ return %s ...@@ -50,7 +50,6 @@ return %s
""" % (script_name, fake_return )) """ % (script_name, fake_return ))
transaction.commit() transaction.commit()
def _dropScript(self, script_name): def _dropScript(self, script_name):
if script_name in self.portal.portal_skins.custom.objectIds(): if script_name in self.portal.portal_skins.custom.objectIds():
self.portal.portal_skins.custom.manage_delObjects(script_name) self.portal.portal_skins.custom.manage_delObjects(script_name)
...@@ -61,31 +60,14 @@ return %s ...@@ -61,31 +60,14 @@ return %s
upgrade_decision.start() upgrade_decision.start()
self.tic() self.tic()
self._simulateScript('UpgradeDecision_upgradeHostingSubscription', 'True') self._simulateScript('UpgradeDecision_processUpgrade', 'True')
try: try:
self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_started.activeSense() self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_started.activeSense()
self.tic() self.tic()
finally: finally:
self._dropScript('UpgradeDecision_upgradeHostingSubscription') self._dropScript('UpgradeDecision_processUpgrade')
self.assertEqual( self.assertEqual(
'Visited by UpgradeDecision_upgradeHostingSubscription', 'Visited by UpgradeDecision_processUpgrade',
upgrade_decision.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_upgrade_decision_process_computer(self):
upgrade_decision = self._makeUpgradeDecision()
upgrade_decision.start()
self.tic()
self._simulateScript('UpgradeDecision_upgradeHostingSubscription', 'False')
self._simulateScript('UpgradeDecision_upgradeComputer', 'True')
try:
self.portal.portal_alarms.slapos_pdm_upgrade_decision_process_started.activeSense()
self.tic()
finally:
self._dropScript('UpgradeDecision_upgradeHostingSubscription')
self._dropScript('UpgradeDecision_upgradeComputer')
self.assertEqual(
'Visited by UpgradeDecision_upgradeComputer',
upgrade_decision.workflow_history['edit_workflow'][-1]['comment']) upgrade_decision.workflow_history['edit_workflow'][-1]['comment'])
def test_alarm_upgrade_decision_process_planned(self): def test_alarm_upgrade_decision_process_planned(self):
...@@ -132,7 +114,6 @@ return %s ...@@ -132,7 +114,6 @@ return %s
computer2.edit(allocation_scope = 'open/personal') computer2.edit(allocation_scope = 'open/personal')
self._simulateScript('Computer_hostingSubscriptionCreateUpgradeDecision') self._simulateScript('Computer_hostingSubscriptionCreateUpgradeDecision')
try: try:
self.portal.portal_alarms.slapos_pdm_hosting_subscription_create_upgrade_decision.\ self.portal.portal_alarms.slapos_pdm_hosting_subscription_create_upgrade_decision.\
activeSense() activeSense()
......
23 24
\ No newline at end of file \ No newline at end of file
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