Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
090e4063
Commit
090e4063
authored
Jul 26, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_upgrader: update test now that we can run any step even if previous step sense error
parent
ff8d63a2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
bt5/erp5_upgrader/TestTemplateItem/portal_components/test.erp5.testUpgrader.py
...tTemplateItem/portal_components/test.erp5.testUpgrader.py
+18
-14
No files found.
bt5/erp5_upgrader/TestTemplateItem/portal_components/test.erp5.testUpgrader.py
View file @
090e4063
...
...
@@ -311,6 +311,16 @@ class TestUpgrader(ERP5TypeTestCase):
alarm_id="
upgrader_check_post_upgrade
")
self.assertFalse(sense, detail_list)
def stepCheckPreUpgradeRequired(self, sequence=None):
sense, detail_list = self._checkAlarmSense(
alarm_id="
upgrader_check_pre_upgrade
")
self.assertTrue(sense, detail_list)
def stepCheckPreUpgradeNotRequired(self, sequence=None):
sense, detail_list = self._checkAlarmSense(
alarm_id="
upgrader_check_pre_upgrade
")
self.assertFalse(sense, detail_list)
def stepUninstallERP5Web(self, sequence=None):
bt5 = self.portal.portal_templates.getInstalledBusinessTemplate('erp5_web')
if bt5 is not None:
...
...
@@ -367,12 +377,6 @@ class TestUpgrader(ERP5TypeTestCase):
return portal.portal_catalog(select_list=['indexation_timestamp'],
uid=portal.portal_templates.getUid())[0].indexation_timestamp
def stepCheckSummaryForPreUpgradeRequired(self, sequence=None):
alarm = self.portal.portal_alarms.upgrader_check_upgrader
active_process = alarm.getLastActiveProcess()
detail_list = active_process.getResultList()[0].detail
self.assertTrue("
Is
required
solve
Pre
Upgrade
first
.
You
need
run
active
sense
once
at
least
on
this
alarm
" in detail_list)
def stepCheckPersonNotInConstraintTypeListPerPortalType(self, sequence=None):
constraint_type_per_type, _ =
\
self.portal.Base_getConstraintTypeListPerPortalType()
...
...
@@ -588,9 +592,9 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_can_
not_
run_post_upgrade_without_solve_upgrade(self):
"""Check that if there is something to solve in
pre_upgrade and upgrade is
not possible run the post upgrade
"""
def test_can_run_post_upgrade_without_solve_upgrade(self):
"""Check that if there is something to solve in
upgrade, it is still possible
to run the post upgrade step directly.
"""
sequence_list = SequenceList()
sequence_string = """
stepUninstallERP5Web
...
...
@@ -605,14 +609,14 @@ class TestUpgrader(ERP5TypeTestCase):
stepRunPostUpgrade
stepTic
stepCheckUpgradeRequired
stepCheckPostUpgradeRequired
stepCheckPostUpgrade
Not
Required
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
def test_can_
not_
run_upgrade_without_solve_pre_upgrade(self):
"""Check that if there is something to solve in pre_upgrade is
not
possible
run
the upgrade
"""
def test_can_run_upgrade_without_solve_pre_upgrade(self):
"""Check that if there is something to solve in pre_upgrade is
still
possible
run
only the upgrade step directly (eventhough this does not really make sense)
"""
sequence_list = SequenceList()
sequence_string = """
stepCreatePerson
...
...
@@ -625,7 +629,7 @@ class TestUpgrader(ERP5TypeTestCase):
stepTic
stepRunUpgrader
stepTic
stepCheck
SummaryFor
PreUpgradeRequired
stepCheckPreUpgradeRequired
"""
sequence_list.addSequenceString(sequence_string)
sequence_list.play(self)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment