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
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
Titouan Soulard
slapos.core
Commits
fc89b8fc
Commit
fc89b8fc
authored
Feb 27, 2023
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: testSlapOSERP5InteractionWorkflow: there is no source administrator on Compute Node
parent
cc95a9d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
51 deletions
+10
-51
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
...components/test.erp5.testSlapOSERP5InteractionWorkflow.py
+10
-51
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
View file @
fc89b8fc
...
...
@@ -23,16 +23,13 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
class
TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope
(
SlapOSTestCaseMixin
):
def
_test_ComputeNode_setAllocationScope_public
(
self
,
allocation_scope
=
"open/public"
,
source_administration
=
None
):
def
test_ComputeNode_setAllocationScope_open
(
self
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
)
compute_node
.
edit
(
capacity_scope
=
None
,
monitor_scope
=
None
,
source_administration
=
source_administration
)
monitor_scope
=
None
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
compute_node
.
edit
(
allocation_scope
=
"open"
)
self
.
commit
()
self
.
assertEqual
(
compute_node
.
getCapacityScope
(),
'close'
)
...
...
@@ -52,50 +49,12 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
return
compute_node
def
test_ComputeNode_setAllocationScope_public_no_source_adm
(
self
):
self
.
_test_ComputeNode_setAllocationScope_public
()
def
test_ComputeNode_setAllocationScope_subscription_no_source_adm
(
self
):
self
.
_test_ComputeNode_setAllocationScope_public
(
allocation_scope
=
"open/subscription"
)
def
test_ComputeNode_setAllocationScope_personal
(
self
,
source_administration
=
None
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
capacity_scope
=
None
,
monitor_scope
=
None
,
source_administration
=
source_administration
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
'open/personal'
)
self
.
commit
()
self
.
assertEqual
(
compute_node
.
getCapacityScope
(),
'close'
)
self
.
assertEqual
(
compute_node
.
getMonitorScope
(),
'enabled'
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
None
)
self
.
commit
()
compute_node
.
edit
(
capacity_scope
=
"open"
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
'open/personal'
)
self
.
commit
()
self
.
assertEqual
(
compute_node
.
getCapacityScope
(),
'close'
)
self
.
assertEqual
(
compute_node
.
getMonitorScope
(),
'enabled'
)
return
compute_node
def
_test_ComputeNode_setAllocationScope_closed
(
self
,
source_administration
=
None
,
allocation_scope
=
"close/forever"
,
monitor_scope
=
'enabled'
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
capacity_scope
=
None
,
monitor_scope
=
None
,
source_administration
=
source_administration
)
allocation_scope
=
"close/forever"
):
compute_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Compute Node'
,
capacity_scope
=
None
,
monitor_scope
=
None
)
self
.
commit
()
compute_node
.
edit
(
allocation_scope
=
allocation_scope
)
...
...
@@ -119,7 +78,7 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
def
test_ComputeNode_setAllocationScope_closed_forever
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
monitor_scope
=
'disabled'
)
self
.
_test_ComputeNode_setAllocationScope_closed
()
def
test_ComputeNode_setAllocationScope_closed_termination
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
...
...
@@ -139,4 +98,4 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
def
test_ComputeNode_setAllocationScope_closed_noallocation
(
self
):
self
.
_test_ComputeNode_setAllocationScope_closed
(
allocation_scope
=
"close/noallocation"
,
)
\ No newline at end of file
)
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