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
bac9b28d
Commit
bac9b28d
authored
Dec 20, 2022
by
Romain Courteaud
🐙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: move tests to virtual master design
parent
61ca6433
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
75 deletions
+0
-75
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
...mponents/test.erp5.testSlapOSERP5VirtualMasterScenario.py
+0
-75
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5VirtualMasterScenario.py
View file @
bac9b28d
...
...
@@ -10,36 +10,6 @@ from erp5.component.test.SlapOSTestCaseDefaultScenarioMixin import DefaultScenar
class
TestSlapOSVirtualMasterScenario
(
DefaultScenarioMixin
):
"""
def addSlapOSAdministratorAssignment(self, person):
person.newContent(
portal_type='Assignment',
# XXX should be project/function instead
group='company'
).open()
"""
def
addProjectProductionManagerAssignment
(
self
,
person
,
project
):
person
.
newContent
(
portal_type
=
'Assignment'
,
destination_project_value
=
project
,
function
=
'production/manager'
).
open
()
def
addProjectCustomerAssignment
(
self
,
person
,
project
):
person
.
newContent
(
portal_type
=
'Assignment'
,
destination_project_value
=
project
,
function
=
'customer'
).
open
()
def
addProject
(
self
):
project
=
self
.
portal
.
project_module
.
newContent
(
portal_type
=
'Project'
,
title
=
'project-%s'
%
self
.
generateNewId
()
)
project
.
validate
()
return
project
def
requestRemoteNode
(
self
,
project
,
remote_project
,
remote_person
):
remote_node
=
self
.
portal
.
compute_node_module
.
newContent
(
portal_type
=
'Remote Node'
,
...
...
@@ -100,51 +70,6 @@ class TestSlapOSVirtualMasterScenario(DefaultScenarioMixin):
software_product
.
validate
()
return
software_product
,
release_variation
,
type_variation
def
addAllocationSupply
(
self
,
title
,
node
,
software_product
,
software_release
,
software_type
,
destination_value
=
None
,
is_slave_on_same_instance_tree_allocable
=
False
):
allocation_supply
=
self
.
portal
.
allocation_supply_module
.
newContent
(
portal_type
=
"Allocation Supply"
,
title
=
title
,
aggregate_value
=
node
,
destination_value
=
destination_value
,
destination_project_value
=
software_product
.
getFollowUpValue
(),
slave_on_same_instance_tree_allocable
=
is_slave_on_same_instance_tree_allocable
)
resource_vcl
=
[
'software_release/%s'
%
software_release
.
getRelativeUrl
(),
'software_type/%s'
%
software_type
.
getRelativeUrl
()
]
resource_vcl
.
sort
()
allocation_supply_line
=
allocation_supply
.
newContent
(
portal_type
=
"Allocation Supply Line"
,
resource_value
=
software_product
,
)
allocation_supply_line
.
edit
(
p_variation_base_category_list
=
allocation_supply_line
.
getVariationRangeBaseCategoryList
()
)
base_id
=
'path'
allocation_supply_line
.
setCellRange
(
base_id
=
base_id
,
*
allocation_supply_line
.
SupplyLine_asCellRange
(
base_id
=
base_id
)
)
#cell_key = list(allocation_supply_line.getCellKeyList(base_id=base_id))[0]
cell_key
=
resource_vcl
allocation_supply_line
.
log
(
resource_vcl
,
cell_key
)
allocation_supply_cell
=
allocation_supply_line
.
newCell
(
base_id
=
base_id
,
portal_type
=
'Allocation Supply Cell'
,
*
cell_key
)
allocation_supply_cell
.
edit
(
mapped_value_property_list
=
[
'allocable'
],
allocable
=
True
,
predicate_category_list
=
cell_key
,
variation_category_list
=
cell_key
)
allocation_supply
.
validate
()
return
allocation_supply
def
stepcheckERP5Consistency
(
self
):
not_consistent_document
=
self
.
portal
.
portal_catalog
.
getResultValue
(
...
...
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