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
b54e9928
Commit
b54e9928
authored
Dec 12, 2022
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_panel_ui_test: test remote node allocation
parent
77285a24
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
421 additions
and
3 deletions
+421
-3
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
...tem/portal_components/extension.erp5.SlapOSPanelUiTest.py
+39
-2
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerRemoteInstanceScenario.xml
...slapos_panel_zuite/testCustomerRemoteInstanceScenario.xml
+58
-0
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerRemoteInstanceScenario.zpt
...slapos_panel_zuite/testCustomerRemoteInstanceScenario.zpt
+322
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
...s_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
+1
-0
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
..._skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
+1
-1
No files found.
master/bt5/slapos_panel_ui_test/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSPanelUiTest.py
View file @
b54e9928
...
...
@@ -21,9 +21,11 @@ def ERP5Site_activateAlarmSlapOSPanelTest(self):
def
ERP5Site_bootstrapSlapOSPanelTest
(
self
,
scenario
,
customer_login
,
manager_login
,
passwd
):
manager_login
,
remote_customer_login
,
passwd
):
if
scenario
not
in
[
'accounting'
,
'customer'
,
'customer_shared'
]:
if
scenario
not
in
[
'accounting'
,
'customer'
,
'customer_shared'
,
'customer_remote'
]:
raise
ValueError
(
'Unsupported bootstrap scenario: %s'
%
scenario
)
portal
=
self
.
getPortalObject
()
...
...
@@ -47,6 +49,13 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario, customer_login,
)
project
.
validate
()
if
scenario
==
'customer_remote'
:
remote_project
=
portal
.
project_module
.
newContent
(
portal_type
=
"Project"
,
title
=
'Test Remote Project'
)
remote_project
.
validate
()
# Bootstrap one manager user
manager_person
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
...
...
@@ -93,6 +102,34 @@ def ERP5Site_bootstrapSlapOSPanelTest(self, scenario, customer_login,
password
=
passwd
).
validate
()
customer_person
.
validate
()
if
scenario
==
'customer_remote'
:
customer_person
.
newContent
(
portal_type
=
'Assignment'
,
title
=
'Production Manager for project %s'
%
remote_project
.
getTitle
(),
destination_project_value
=
remote_project
,
function
=
'production/manager'
).
open
()
# Bootstrap one customer user for the remote project
remote_customer_person
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
'Manual test Remote Project Customer'
,
default_email_coordinate_text
=
'romain+remote+customer@nexedi.com'
)
remote_customer_person
.
newContent
(
portal_type
=
'Assignment'
,
title
=
'Customer for project %s'
%
remote_project
.
getTitle
(),
destination_project_value
=
remote_project
,
function
=
'customer'
).
open
()
remote_customer_person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
remote_customer_login
,
password
=
passwd
).
validate
()
remote_customer_person
.
validate
()
finally
:
setSecurityManager
(
sm
)
...
...
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerRemoteInstanceScenario.xml
0 → 100644
View file @
b54e9928
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testCustomerRemoteInstanceScenario
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_panel_ui_test/PathTemplateItem/portal_tests/slapos_panel_zuite/testCustomerRemoteInstanceScenario.zpt
0 → 100644
View file @
b54e9928
This diff is collapsed.
Click to expand it.
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/ERP5Site_generateTestUserConfiguration.py
View file @
b54e9928
...
...
@@ -4,6 +4,7 @@ now = int(DateTime())
return
{
'customer_login'
:
'testcustomer%s'
%
now
,
'remote_customer_login'
:
'testremotecustomer%s'
%
now
,
'manager_login'
:
'testmanager%s'
%
now
,
'passwd'
:
'eiChaxo5Eefier9vAek7phie$%s'
%
now
}
master/bt5/slapos_panel_ui_test/SkinTemplateItem/portal_skins/slapos_panel_ui_test/Zuite_SlapOSPanelTemplate.zpt
View file @
b54e9928
...
...
@@ -11,7 +11,7 @@
<tr>
<td>open</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?scenario=%s&manager_login=%s&customer_login=%s&
passwd=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['
customer_login'], user_configuration['passwd'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td tal:content="python: '${base_url}/ERP5Site_bootstrapSlapOSPanelTest?scenario=%s&manager_login=%s&customer_login=%s&
remote_customer_login=%s&passwd=%s' % (init_configuration['scenario'], user_configuration['manager_login'], user_configuration['customer_login'], user_configuration['remote_
customer_login'], user_configuration['passwd'])">.../ERP5Site_bootstrapSlapOSPanelTest</td>
<td></td>
</tr>
<tr>
...
...
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