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
Carlos Ramos Carreño
slapos.core
Commits
1bf8c5a0
Commit
1bf8c5a0
authored
Sep 16, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
slapos_erp5: Periodically test coverage with a CodingStyle test
See merge request
nexedi/slapos.core!422
parents
a225fb6c
777d6c62
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
360 additions
and
114 deletions
+360
-114
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/ERP5Site_testPythonScriptTestCoverage.py
...s_administration/ERP5Site_testPythonScriptTestCoverage.py
+0
-28
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/ERP5Site_testPythonScriptTestCoverage.xml
..._administration/ERP5Site_testPythonScriptTestCoverage.xml
+0
-62
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+357
-0
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.xml
...tem/portal_components/test.erp5.testSlapOSCodingStyle.xml
+3
-24
No files found.
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/ERP5Site_testPythonScriptTestCoverage.py
deleted
100644 → 0
View file @
a225fb6c
portal
=
context
.
getPortalObject
()
content_dict
=
{}
for
test_component
in
portal
.
portal_components
.
searchFolder
(
portal_type
=
'Test Component'
):
if
"Slap"
not
in
test_component
.
getId
():
continue
content_dict
[
test_component
.
getId
()]
=
test_component
.
getTextContent
()
print
len
(
content_dict
)
for
skin_folder
in
portal
.
portal_skins
.
objectValues
(
'Folder'
):
if
not
skin_folder
.
getId
().
startswith
(
"slapos"
):
continue
for
skin
in
skin_folder
.
objectValues
():
if
skin
.
getId
().
startswith
(
"Alarm_"
):
continue
if
skin
.
meta_type
in
(
'Script (Python)'
,
'Z SQL Method'
,
):
found
=
0
for
_
,
content
in
content_dict
.
iteritems
():
if
skin
.
getId
()
in
content
:
found
=
1
break
if
not
found
:
print
"%s/%s"
%
(
skin_folder
.
getId
(),
skin
.
getId
())
container
.
REQUEST
.
RESPONSE
.
setHeader
(
'content-type'
,
'text/plain'
)
return
'
\
n
'
.
join
(
sorted
(
printed
.
splitlines
()))
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_administration/ERP5Site_testPythonScriptTestCoverage.xml
deleted
100644 → 0
View file @
a225fb6c
<?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>
ERP5Site_testPythonScriptTestCoverage
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
1bf8c5a0
This diff is collapsed.
Click to expand it.
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.xml
View file @
1bf8c5a0
...
@@ -6,12 +6,6 @@
...
@@ -6,12 +6,6 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testSlapOSCodingStyle
</string>
</value>
<value>
<string>
testSlapOSCodingStyle
</string>
</value>
...
@@ -55,28 +49,13 @@
...
@@ -55,28 +49,13 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -89,7 +68,7 @@
...
@@ -89,7 +68,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -98,7 +77,7 @@
...
@@ -98,7 +77,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
</pickle>
...
...
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