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
d3a0625b
Commit
d3a0625b
authored
Mar 02, 2023
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: disable monitor only if allocation_scope is closed/forever
parent
1b076539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
...components/test.erp5.testSlapOSERP5InteractionWorkflow.py
+7
-3
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
View file @
d3a0625b
...
...
@@ -23,13 +23,13 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
class
TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope
(
SlapOSTestCaseMixin
):
def
test_ComputeNode_setAllocationScope_open
(
self
):
def
test_ComputeNode_setAllocationScope_open
(
self
,
allocation_scope
=
"open"
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
compute_node
.
edit
(
capacity_scope
=
None
,
monitor_scope
=
None
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
"open"
)
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
self
.
commit
()
self
.
assertEqual
(
compute_node
.
getCapacityScope
(),
'close'
)
...
...
@@ -50,7 +50,8 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
return
compute_node
def
_test_ComputeNode_setAllocationScope_closed
(
self
,
allocation_scope
=
"close/forever"
):
allocation_scope
=
"close/forever"
,
monitor_scope
=
"disabled"
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
capacity_scope
=
None
,
...
...
@@ -83,16 +84,19 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
def
test_ComputeNode_setAllocationScope_closed_termination
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/termination"
,
monitor_scope
=
"enabled"
)
def
test_ComputeNode_setAllocationScope_closed_outdated
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/outdated"
,
monitor_scope
=
"enabled"
)
def
test_ComputeNode_setAllocationScope_closed_maintenance
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/maintenance"
,
monitor_scope
=
"enabled"
)
def
test_ComputeNode_setAllocationScope_closed_noallocation
(
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