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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
07fd9edc
Commit
07fd9edc
authored
Jan 08, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui&test: return error if appcache file is not existed
parent
ed8c62b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSite_checkCacheModificationDateConsistency.py
...renderjs/WebSite_checkCacheModificationDateConsistency.py
+4
-4
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testRJSUpgrader.py
...mplateItem/portal_components/test.erp5.testRJSUpgrader.py
+10
-0
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSite_checkCacheModificationDateConsistency.py
View file @
07fd9edc
...
@@ -5,12 +5,12 @@ getDocumentValue = context.getDocumentValue
...
@@ -5,12 +5,12 @@ getDocumentValue = context.getDocumentValue
error_list
=
[]
error_list
=
[]
if
appcache_reference
:
if
appcache_reference
:
appcache_manifest
=
getDocumentValue
(
appcache_reference
)
if
not
appcache_manifest
:
return
[
'Error: Web Site %s references a non existant appcache %s'
%
(
context
.
getRelativeUrl
(),
appcache_reference
)]
url_list
=
context
.
Base_getListFileFromAppcache
()
url_list
=
context
.
Base_getListFileFromAppcache
()
# Check that the manifest is newer than all cached resources.
# Check that the manifest is newer than all cached resources.
appcache_manifest
=
getDocumentValue
(
appcache_reference
)
appcache_manifest_modification_date
=
appcache_manifest
.
getObject
().
getModificationDate
()
if
appcache_manifest
is
not
None
:
appcache_manifest
=
appcache_manifest
.
getObject
()
appcache_manifest_modification_date
=
appcache_manifest
.
getModificationDate
()
for
url
in
url_list
:
for
url
in
url_list
:
if
url
:
if
url
:
referenced_document
=
getDocumentValue
(
url
)
referenced_document
=
getDocumentValue
(
url
)
...
...
bt5/erp5_web_renderjs_ui_test/TestTemplateItem/portal_components/test.erp5.testRJSUpgrader.py
View file @
07fd9edc
...
@@ -109,3 +109,13 @@ class TestRenderJSUpgrade(ERP5TypeTestCase):
...
@@ -109,3 +109,13 @@ class TestRenderJSUpgrade(ERP5TypeTestCase):
manifest_content_list
=
manifest_content
.
split
(
'
\
n
'
)
manifest_content_list
=
manifest_content
.
split
(
'
\
n
'
)
self
.
assertIn
(
manifest_content_list
[
0
]
,
self
.
manifest
.
getTextContent
())
self
.
assertIn
(
manifest_content_list
[
0
]
,
self
.
manifest
.
getTextContent
())
self
.
assertIn
(
'
\
n
'
.
join
(
manifest_content_list
[
2
:])
,
self
.
manifest
.
getTextContent
())
self
.
assertIn
(
'
\
n
'
.
join
(
manifest_content_list
[
2
:])
,
self
.
manifest
.
getTextContent
())
def
test_upgrade_site_with_non_existant_appcache
(
self
):
non_existant_appcache
=
'gw4wA4qA4T9^s*L3WD="k]'
self
.
web_site
.
setProperty
(
'configuration_manifest_url'
,
non_existant_appcache
)
self
.
tic
()
self
.
assertEqual
(
[
'Error: Web Site %s references a non existant appcache %s'
%
(
self
.
web_site
.
getRelativeUrl
(),
non_existant_appcache
)
],
[
str
(
m
.
getMessage
())
for
m
in
self
.
web_site
.
checkConsistency
()])
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