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
75a61a17
Commit
75a61a17
authored
Jun 01, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_erp5: add customer project assignment
parent
d998fce3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.py
...tal_components/test.erp5.testSlapOSERP5DefaultScenario.py
+23
-6
No files found.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5DefaultScenario.py
View file @
75a61a17
...
...
@@ -40,6 +40,13 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
function
=
'computer/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'
,
...
...
@@ -97,13 +104,14 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
public_person
=
self
.
portal
.
portal_catalog
.
getResultValue
(
portal_type
=
"ERP5 Login"
,
reference
=
public_reference
).
getParentValue
()
self
.
addProjectCustomerAssignment
(
public_person
,
project
)
public_instance_title
=
'Public title %s'
%
self
.
generateNewId
()
public_instance_type
=
'public type'
self
.
checkInstanceAllocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
public_server_software
,
public_instance_type
,
public_server
)
public_server
,
project
.
getReference
()
)
# turn public guy to a friend and check that he can allocate slave
...
...
@@ -117,7 +125,8 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
# and the instances
self
.
checkInstanceUnallocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
public_server_software
,
public_instance_type
,
public_server
)
public_server_software
,
public_instance_type
,
public_server
,
project
.
getReference
())
# and uninstall some software on them
self
.
logout
()
...
...
@@ -134,6 +143,7 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
self
.
stepCallSlaposRequestUpdateInstanceTreeOpenSaleOrderAlarm
()
self
.
tic
()
self
.
logout
()
self
.
login
()
self
.
assertOpenSaleOrderCoverage
(
public_reference
)
...
...
@@ -218,16 +228,23 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
self
.
stepCallSlaposManageBuildingCalculatingDeliveryAlarm
()
self
.
tic
()
"""
self.logout()
self.login('ERP5TypeTestCase')
# trigger the CRM interaction
self.stepCallSlaposCrmCreateRegularisationRequestAlarm()
self.tic()
self.logout()
self.login()
# check final document state
for person_reference in (owner_reference, ):
person = self.portal.portal_catalog.getResultValue(
portal_type='ERP5 Login', reference=person_reference).getParentValue()
self.assertPersonDocumentCoverage(person)
"""
def
test_default_scenario
(
self
):
# some preparation
...
...
@@ -291,7 +308,7 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
self
.
checkInstanceAllocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
public_server_software
,
public_instance_type
,
public_server
)
public_server
,
'XXX'
)
# join as other person and request a software instance on compute_node
# configured by owner
...
...
@@ -336,7 +353,7 @@ class TestSlapOSDefaultScenario(DefaultScenarioMixin):
# and the instances
self
.
checkInstanceUnallocation
(
public_person
.
getUserId
(),
public_reference
,
public_instance_title
,
public_server_software
,
public_instance_type
,
public_server
)
public_server_software
,
public_instance_type
,
public_server
,
'XXX'
)
self
.
checkInstanceUnallocation
(
other_person
.
getUserId
(),
other_reference
,
other_instance_title
,
...
...
@@ -567,7 +584,7 @@ class TestSlapOSDefaultCRMEscalation(DefaultScenarioMixin):
public_instance_type
=
'public type'
public_server_software
=
self
.
generateNewSoftwareReleaseUrl
()
self
.
requestInstance
(
person
.
getUserId
(),
public_instance_title
,
public_server_software
,
public_instance_type
)
public_server_software
,
public_instance_type
,
'XXX'
)
# check the Open Sale Order coverage
self
.
stepCallSlaposRequestUpdateInstanceTreeOpenSaleOrderAlarm
()
...
...
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