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
cfc10625
Commit
cfc10625
authored
Jan 31, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_crm: fix slapos_crm_check_software_installation_state alarm test
parent
c00f2b82
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
50 deletions
+16
-50
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
...ateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
+16
-50
No files found.
master/bt5/slapos_crm/TestTemplateItem/portal_components/test.erp5.testSlapOSCRMAlarm.py
View file @
cfc10625
...
...
@@ -575,62 +575,17 @@ class TestSlapOSCrmMonitoringCheckComputeNodeAllocationScope(SlapOSTestCaseMixin
class
TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation
(
SlapOSTestCaseMixinWithAbort
):
def
test_
alarm
_run_on_open_public
(
self
):
def
test_
checkSoftwareInstallationState
_run_on_open_public
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/public'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_software_installation_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
<<<<<<<
HEAD
=======
def
test_alarm_run_on_open_friend
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/friend'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_software_installation_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
>>>>>>>
slapos_crm
:
lint
def
test_alarm_run_on_open_personal
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/personal'
,
monitor_scope
=
"enabled"
)
self
.
compute_node
.
edit
(
allocation_scope
=
'open'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_software_installation_state
self
.
_test_alarm
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
def
test_alarm_dont_run_on_open_public_with_monitor_scope_disabled
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/public'
)
self
.
tic
()
self
.
compute_node
.
edit
(
monitor_scope
=
'disabled'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_software_installation_state
self
.
_test_alarm_not_visited
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
<<<<<<<
HEAD
=======
def
test_alarm_dont_run_on_open_friend_with_monitor_scope_disabled
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/friend'
)
self
.
tic
()
self
.
compute_node
.
edit
(
monitor_scope
=
'disabled'
)
self
.
tic
()
alarm
=
self
.
portal
.
portal_alarms
.
\
slapos_crm_check_software_installation_state
self
.
_test_alarm_not_visited
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
>>>>>>>
slapos_crm
:
lint
def
test_alarm_dont_run_on_open_personal_with_monitor_scope_disabled
(
self
):
def
test_checkSoftwareInstallationState_dont_run_on_open_public_with_monitor_scope_disabled
(
self
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
'open/personal'
,
monitor_scope
=
"enabled"
)
self
.
compute_node
.
edit
(
allocation_scope
=
'open'
)
self
.
tic
()
self
.
compute_node
.
edit
(
monitor_scope
=
'disabled'
)
self
.
tic
()
...
...
@@ -638,7 +593,7 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
slapos_crm_check_software_installation_state
self
.
_test_alarm_not_visited
(
alarm
,
self
.
compute_node
,
"ComputeNode_checkSoftwareInstallationState"
)
def
_test_
alarm_not_run_on_close
(
self
,
allocation_scope
,
monitor_scope
=
Non
e
):
def
_test_
checkSoftwareInstallationState_not_run_on_close
(
self
,
allocation_scop
e
):
self
.
_makeComputeNode
(
self
.
addProject
())
self
.
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
self
.
tic
()
...
...
@@ -686,6 +641,17 @@ class TestSlapOSCrmMonitoringCheckComputeNodeSoftwareInstallation(SlapOSTestCase
def
test_alarm_run_on_close_noallocation
(
self
):
self
.
_test_alarm_run_on_close
(
'close/noallocation'
)
def
test_checkSoftwareInstallationState_not_run_on_close_forever
(
self
):
self
.
_test_checkSoftwareInstallationState_not_run_on_close
(
'close/forever'
)
def
test_checkSoftwareInstallationState_not_run_on_close_maintainence
(
self
):
self
.
_test_checkSoftwareInstallationState_not_run_on_close
(
'close/maintenence'
)
def
test_checkSoftwareInstallationState_not_run_on_close_outdated
(
self
):
self
.
_test_checkSoftwareInstallationState_not_run_on_close
(
'close/outdated'
)
def
test_checkSoftwareInstallationState_not_run_on_close_termination
(
self
):
self
.
_test_checkSoftwareInstallationState_not_run_on_close
(
'close/termination'
)
class
TestSlapOSCrmMonitoringCheckInstanceInError
(
SlapOSTestCaseMixinWithAbort
):
...
...
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