Commit c6794993 authored by Nicolas Wavrant's avatar Nicolas Wavrant

testUpgrader: test that post-upgrader alarm is not triggered during a sense of full-upgrade

parent 535dd563
...@@ -306,6 +306,11 @@ class TestUpgrader(ERP5TypeTestCase): ...@@ -306,6 +306,11 @@ class TestUpgrader(ERP5TypeTestCase):
alarm_id="promise_check_upgrade") alarm_id="promise_check_upgrade")
self.assertTrue(sense, detail_list) self.assertTrue(sense, detail_list)
def stepCheckFullUpgradeNotRequired(self, sequence=None):
sense, detail_list = self._checkAlarmSense(
alarm_id="promise_check_upgrade")
self.assertFalse(sense, detail_list)
def stepCheckPostUpgradeNotRequired(self, sequence=None): def stepCheckPostUpgradeNotRequired(self, sequence=None):
sense, detail_list = self._checkAlarmSense( sense, detail_list = self._checkAlarmSense(
alarm_id="upgrader_check_post_upgrade") alarm_id="upgrader_check_post_upgrade")
...@@ -743,3 +748,23 @@ class TestUpgrader(ERP5TypeTestCase): ...@@ -743,3 +748,23 @@ class TestUpgrader(ERP5TypeTestCase):
""" """
sequence_list.addSequenceString(sequence_string) sequence_list.addSequenceString(sequence_string)
sequence_list.play(self) sequence_list.play(self)
def test_sense_full_upgrade_do_not_sense_post_upgrade(self):
"""
Check that the post-upgrade consistency check is not run
when running the activeSense method of the full-upgrade alarm,
as post-upgrade will give inconsistent result
"""
sequence_list = SequenceList()
sequence_string = """
stepRunUpgrader
stepTic
stepCreatePerson
stepValidatePerson
stepSetConstraintInPersonModulePortalType
stepTic
stepCheckFullUpgradeNotRequired
stepCheckPostUpgradeRequired
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
\ 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