Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
erp5
Commits
2e98da06
Commit
2e98da06
authored
Apr 16, 2019
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task distribution: avoid to reset reference on test suite if invalidated/revalidated
parent
87492a24
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
...eItem/portal_components/test.erp5.testTaskDistribution.py
+19
-0
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/TestSuite_afterValidate.py
...ow/test_suite_workflow/scripts/TestSuite_afterValidate.py
+3
-2
No files found.
bt5/erp5_test_result/TestTemplateItem/portal_components/test.erp5.testTaskDistribution.py
View file @
2e98da06
...
@@ -164,6 +164,25 @@ class TestTaskDistribution(ERP5TypeTestCase):
...
@@ -164,6 +164,25 @@ class TestTaskDistribution(ERP5TypeTestCase):
test_suite
.
invalidate
()
test_suite
.
invalidate
()
self
.
assertRaises
(
ValidationFailed
,
self
.
portal
.
portal_workflow
.
doActionFor
,
test_suite
,
'validate_action'
)
self
.
assertRaises
(
ValidationFailed
,
self
.
portal
.
portal_workflow
.
doActionFor
,
test_suite
,
'validate_action'
)
def
test_02c_checkTestSuiteReference
(
self
):
"""
Make sure validation of test suite generate a reference, and revalidating
a test suite should not change reference
"""
test_suite
,
=
self
.
_createTestSuite
()
self
.
assertTrue
(
test_suite
.
getReference
()
!=
None
)
self
.
tic
()
test_suite
.
invalidate
()
self
.
tic
()
test_suite
.
setReference
(
None
)
test_suite
.
validate
()
reference
=
test_suite
.
getReference
()
self
.
assertTrue
(
reference
!=
None
)
test_suite
.
invalidate
()
self
.
tic
()
test_suite
.
validate
()
self
.
assertEqual
(
reference
,
test_suite
.
getReference
())
def
_callOptimizeAlarm
(
self
):
def
_callOptimizeAlarm
(
self
):
self
.
portal
.
portal_alarms
.
task_distributor_alarm_optimize
.
activeSense
()
self
.
portal
.
portal_alarms
.
task_distributor_alarm_optimize
.
activeSense
()
self
.
tic
()
self
.
tic
()
...
...
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_suite_workflow/scripts/TestSuite_afterValidate.py
View file @
2e98da06
...
@@ -13,8 +13,9 @@ def int2letter(i):
...
@@ -13,8 +13,9 @@ def int2letter(i):
d
,
m
=
divmod
(
i
,
26
)
d
,
m
=
divmod
(
i
,
26
)
return
int2letter
(
d
-
1
)
+
int2letter
(
m
)
return
int2letter
(
d
-
1
)
+
int2letter
(
m
)
new_id
=
portal
.
portal_ids
.
generateNewId
(
id_generator
=
"uid"
,
id_group
=
"test_suite_reference"
)
if
test_suite
.
getReference
()
is
None
:
test_suite
.
setReference
(
int2letter
(
new_id
))
new_id
=
portal
.
portal_ids
.
generateNewId
(
id_generator
=
"uid"
,
id_group
=
"test_suite_reference"
)
test_suite
.
setReference
(
int2letter
(
new_id
))
def
generateRandomString
(
size
):
def
generateRandomString
(
size
):
tab
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
tab
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
...
...
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