Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
f1c32fa1
Commit
f1c32fa1
authored
Jan 18, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_pdm: test alarm_instance_tree_create_upgrade_decision
parent
3d7b76cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
+21
-11
No files found.
master/bt5/slapos_pdm/TestTemplateItem/portal_components/test.erp5.testSlapOSPDMAlarm.py
View file @
f1c32fa1
...
...
@@ -18,7 +18,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
##############################################################################
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
from
erp5.component.test.SlapOSTestCaseMixin
import
SlapOSTestCaseMixin
,
TemporaryAlarmScript
class
TestSlapOSUpgradeDecisionProcess
(
SlapOSTestCaseMixin
):
def
afterSetUp
(
self
):
...
...
@@ -119,16 +119,26 @@ class TestSlapOSUpgradeDecisionProcess(SlapOSTestCaseMixin):
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/termination'
,
'never'
)
self
.
_test_alarm_compute_node_create_upgrade_decision_not_visited
(
'close/noallocation'
,
'never'
)
def
test_
tocheck_
alarm_instance_tree_create_upgrade_decision
(
self
):
def
test_alarm_instance_tree_create_upgrade_decision
(
self
):
instance_tree
=
self
.
_makeInstanceTree
()
self
.
_test_alarm
(
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
instance_tree
,
'InstanceTree_createUpgradeDecision'
)
self
.
tic
()
with
TemporaryAlarmScript
(
self
.
portal
,
'InstanceTree_createUpgradeDecision'
):
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
.
\
activeSense
()
self
.
tic
()
self
.
assertEqual
(
'Visited by InstanceTree_createUpgradeDecision'
,
instance_tree
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_
tocheck_
alarm_create_upgrade_decision_destroyed_instance_tree
(
self
):
def
test_alarm_create_upgrade_decision_destroyed_instance_tree
(
self
):
instance_tree
=
self
.
_makeInstanceTree
(
slap_state
=
"destroy_requested"
)
self
.
_test_alarm_not_visited
(
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
,
instance_tree
,
'InstanceTree_createUpgradeDecision'
)
self
.
tic
()
with
TemporaryAlarmScript
(
self
.
portal
,
'InstanceTree_createUpgradeDecision'
):
self
.
portal
.
portal_alarms
.
slapos_pdm_instance_tree_create_upgrade_decision
.
\
activeSense
()
self
.
tic
()
self
.
assertNotEqual
(
'Visited by InstanceTree_createUpgradeDecision'
,
instance_tree
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
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