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
d6b30c5e
Commit
d6b30c5e
authored
Jan 31, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: fixup slapos_crm_check_compute_node_state tests
parent
cfc10625
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
28 deletions
+15
-28
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+15
-28
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
d6b30c5e
...
...
@@ -476,9 +476,9 @@ class TestSlapOSCrmDeleteInstanceTree(SlapOSTestCaseMixinWithAbort):
class
TestSlapOSCrmMonitoringCheckComputeNodeState
(
SlapOSTestCaseMixinWithAbort
):
def
test_
alarm_check
_public_compute_node_state
(
self
):
def
test_
checkComputeNodeState
_public_compute_node_state
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open
/public
'
)
self
.
compute_node
.
edit
(
allocation_scope
=
'open'
)
self
.
tic
()
self
.
assertEqual
(
self
.
compute_node
.
getMonitorScope
(),
"enabled"
)
self
.
tic
()
...
...
@@ -486,14 +486,6 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
slapos_crm_check_compute_node_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkState"
)
def
test_alarm_check_personal_compute_node_state
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/personal'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_compute_node_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkState"
)
def
_test_alarm_check_compute_node_state_selected
(
self
,
allocation_scope
,
monitor_scope
=
None
):
self
.
_makeComputeNode
()
...
...
@@ -507,7 +499,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
slapos_crm_check_compute_node_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkState"
)
def
_test_
alarm_check
_compute_node_state_not_selected
(
self
,
allocation_scope
,
def
_test_
checkComputeNodeState
_compute_node_state_not_selected
(
self
,
allocation_scope
,
monitor_scope
=
None
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
...
...
@@ -520,27 +512,22 @@ class TestSlapOSCrmMonitoringCheckComputeNodeState(SlapOSTestCaseMixinWithAbort)
slapos_crm_check_compute_node_state
self
.
_test_alarm_not_visited
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkState"
)
def
test_
alarm_check
_compute_node_state_on_public_compute_node_with_monitor_scope_disabled
(
self
):
self
.
_test_
alarm_check
_compute_node_state_not_selected
(
allocation_scope
=
'open
/public
'
,
def
test_
checkComputeNodeState
_compute_node_state_on_public_compute_node_with_monitor_scope_disabled
(
self
):
self
.
_test_
checkComputeNodeState
_compute_node_state_not_selected
(
allocation_scope
=
'open'
,
monitor_scope
=
"disabled"
)
def
test_alarm_check_compute_node_state_on_personal_compute_node_with_monitor_scope_disabled
(
self
):
self
.
_test_alarm_check_compute_node_state_not_selected
(
allocation_scope
=
'open/personal'
,
monitor_scope
=
"disabled"
)
def
test_checkComputeNodeState_compute_node_state_closed_forever_compute_node
(
self
):
self
.
_test_checkComputeNodeState_compute_node_state_not_selected
(
allocation_scope
=
'closed/forever'
)
def
test_
alarm_check_compute_node_state_closed_forever
_compute_node
(
self
):
self
.
_test_
alarm_check
_compute_node_state_not_selected
(
allocation_scope
=
'close
/forever
'
)
def
test_
checkComputeNodeState_compute_node_state_closed_mantainence
_compute_node
(
self
):
self
.
_test_
checkComputeNodeState
_compute_node_state_not_selected
(
allocation_scope
=
'close
d/maintenance
'
)
def
test_alarm_check_compute_node_state_closed_mantainence_compute_node
(
self
):
self
.
_test_alarm_check_compute_node_state_selected
(
allocation_scope
=
'close/maintenance'
)
def
test_alarm_check_compute_node_state_closed_termination_compute_node
(
self
):
self
.
_test_alarm_check_compute_node_state_selected
(
allocation_scope
=
'close/termination'
)
def
test_checkComputeNodeState_compute_node_state_closed_termination_compute_node
(
self
):
self
.
_test_checkComputeNodeState_compute_node_state_not_selected
(
allocation_scope
=
'closed/termination'
)
def
test_alarm_check_compute_node_state_closed_noallocation_compute_node
(
self
):
self
.
_test_alarm_check_compute_node_state_selected
(
...
...
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