Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Lukas Niegsch
erp5
Commits
d870d278
Commit
d870d278
authored
Mar 12, 2020
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
Auto deployment tests
This MR continues
!1074
(Ivan's mistake) See merge request
!1077
parents
50805955
7ceb37ef
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
321 additions
and
8 deletions
+321
-8
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
...rp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
+10
-7
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.xml
...p5_scalability_test/ERP5Site_bootstrapScalabilityTest.xml
+1
-1
bt5/erp5_scalability_test_auto_configuration/PathTemplateItem/portal_alarms/erp5_auto_configuration.xml
...athTemplateItem/portal_alarms/erp5_auto_configuration.xml
+101
-0
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration.xml
...portal_skins/erp5_scalability_test_auto_configuration.xml
+47
-0
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/Alarm_setupAutoConfiguration.py
...y_test_auto_configuration/Alarm_setupAutoConfiguration.py
+19
-0
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/Alarm_setupAutoConfiguration.xml
..._test_auto_configuration/Alarm_setupAutoConfiguration.xml
+62
-0
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/ERP5Site_isReady.py
...5_scalability_test_auto_configuration/ERP5Site_isReady.py
+5
-0
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/ERP5Site_isReady.xml
..._scalability_test_auto_configuration/ERP5Site_isReady.xml
+70
-0
bt5/erp5_scalability_test_auto_configuration/bt/description
bt5/erp5_scalability_test_auto_configuration/bt/description
+1
-0
bt5/erp5_scalability_test_auto_configuration/bt/template_format_version
...bility_test_auto_configuration/bt/template_format_version
+1
-0
bt5/erp5_scalability_test_auto_configuration/bt/template_path_list
...scalability_test_auto_configuration/bt/template_path_list
+2
-0
bt5/erp5_scalability_test_auto_configuration/bt/template_skin_id_list
...lability_test_auto_configuration/bt/template_skin_id_list
+1
-0
bt5/erp5_scalability_test_auto_configuration/bt/title
bt5/erp5_scalability_test_auto_configuration/bt/title
+1
-0
No files found.
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.py
View file @
d870d278
...
...
@@ -11,7 +11,8 @@ portal_catalog = portal.portal_catalog
status_code
=
0
error_message
=
"No error."
context
.
ERP5Site_setUpActivityTool
()
if
setup_activity_tool
:
context
.
ERP5Site_setUpActivityTool
()
if
user_quantity
is
None
:
return
json
.
dumps
({
"status_code"
:
1
,
...
...
@@ -42,12 +43,14 @@ if configurator.getSimulationState() == "draft":
# create users if installation is done
try
:
context
.
portal_categories
.
activate
(
after_method_id
=
(
'ERP5Site_afterConfigurationSetup'
,
'immediateReindexObject'
)
).
ERP5Site_createTestData
(
user_quantity
,
password
)
context
.
portal_categories
.
activate
(
after_method_id
=
(
'ERP5Site_afterConfigurationSetup'
,
'immediateReindexObject'
)
).
ERP5Site_setIdGenerator
()
if
create_test_data
:
context
.
portal_categories
.
activate
(
after_method_id
=
(
'ERP5Site_afterConfigurationSetup'
,
'immediateReindexObject'
)
).
ERP5Site_createTestData
(
user_quantity
,
password
)
if
set_id_generator
:
context
.
portal_categories
.
activate
(
after_method_id
=
(
'ERP5Site_afterConfigurationSetup'
,
'immediateReindexObject'
)
).
ERP5Site_setIdGenerator
()
except
Exception
as
e
:
status_code
=
1
error_message
=
"Error calling ERP5Site_createTestData script: "
+
str
(
e
)
...
...
bt5/erp5_scalability_test/SkinTemplateItem/portal_skins/erp5_scalability_test/ERP5Site_bootstrapScalabilityTest.xml
View file @
d870d278
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
user_quantity=None
</string>
</value>
<value>
<string>
user_quantity=None
, setup_activity_tool=True, create_test_data=True, set_id_generator=True
</string>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
...
...
bt5/erp5_scalability_test_auto_configuration/PathTemplateItem/portal_alarms/erp5_auto_configuration.xml
0 → 100644
View file @
d870d278
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_setupAutoConfiguration
</string>
</value>
</item>
<item>
<key>
<string>
automatic_solve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_auto_configuration
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
30
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1577836800.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
sense_method_id
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Setup the default automatic ERP5\'s configuration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration.xml
0 → 100644
View file @
d870d278
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
business_template_skin_layer_priority
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
float
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
business_template_skin_layer_priority
</string>
</key>
<value>
<float>
110.0
</float>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
erp5_scalability_test_auto_configuration
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/Alarm_setupAutoConfiguration.py
0 → 100644
View file @
d870d278
"""
This script will setup the default ERP5's configuration as saved in erp5_scalability_test business template.
As this modifies your site care must be taken!
"""
from
Products.ERP5Type.Log
import
log
portal
=
context
.
getPortalObject
()
configurator
=
getattr
(
portal
.
business_configuration_module
,
"default_standard_configuration"
,
None
)
if
configurator
is
None
:
log
(
"Could not find the scalability business configuration object. Be sure to have erp5_scalability_test business template installed."
)
return
if
not
portal
.
ERP5Site_isReady
():
# nothing installed, thus do it
log
(
"START auto-configuration for ERP5's default configuration."
)
context
.
ERP5Site_bootstrapScalabilityTest
(
user_quantity
=
0
,
setup_activity_tool
=
False
,
create_test_data
=
False
,
set_id_generator
=
False
)
else
:
log
(
"All configured. Nothing to do."
)
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/Alarm_setupAutoConfiguration.xml
0 → 100644
View file @
d870d278
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<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_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<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>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_setupAutoConfiguration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/ERP5Site_isReady.py
0 → 100644
View file @
d870d278
"""
The purpose of the script is to tell if configuration of a site was finished or not.
It is used from Deployment Tests.
"""
return
context
.
portal_templates
.
getInstalledBusinessTemplate
(
"erp5_accounting"
,
strict
=
True
)
is
not
None
bt5/erp5_scalability_test_auto_configuration/SkinTemplateItem/portal_skins/erp5_scalability_test_auto_configuration/ERP5Site_isReady.xml
0 → 100644
View file @
d870d278
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<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_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<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>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_isReady
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_scalability_test_auto_configuration/bt/description
0 → 100644
View file @
d870d278
[CAUTION] This business templates installs default ERP5's configuration thus it can potentially destroy your site!
\ No newline at end of file
bt5/erp5_scalability_test_auto_configuration/bt/template_format_version
0 → 100644
View file @
d870d278
1
\ No newline at end of file
bt5/erp5_scalability_test_auto_configuration/bt/template_path_list
0 → 100644
View file @
d870d278
portal_alarms/erp5_auto_configuration
portal_alarms/erp5_auto_configuration/**
\ No newline at end of file
bt5/erp5_scalability_test_auto_configuration/bt/template_skin_id_list
0 → 100644
View file @
d870d278
erp5_scalability_test_auto_configuration
\ No newline at end of file
bt5/erp5_scalability_test_auto_configuration/bt/title
0 → 100644
View file @
d870d278
erp5_scalability_test_auto_configuration
\ 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