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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
50d38916
Commit
50d38916
authored
Nov 16, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests: configure memcached for all tests
parent
5e76b157
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+9
-0
product/ERP5Type/tests/testCacheTool.py
product/ERP5Type/tests/testCacheTool.py
+2
-7
No files found.
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
50d38916
...
...
@@ -977,6 +977,14 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
preference
.
_setPreferredOoodocServerAddress
(
conversion_dict
[
'hostname'
])
preference
.
_setPreferredOoodocServerPortNumber
(
conversion_dict
[
'port'
])
def
_updateMemcachedConfiguration
(
self
):
"""Update default memcached plugin configuration
"""
portal_memcached
=
self
.
portal
.
portal_memcached
connection_dict
=
_getVolatileMemcachedServerDict
()
url_string
=
'%(hostname)s:%(port)s'
%
connection_dict
portal_memcached
.
default_memcached_plugin
.
setUrlString
(
url_string
)
def
_recreateCatalog
(
self
,
quiet
=
0
):
"""Clear activities and catalog and recatalog everything.
Test runner can set `erp5_tests_recreate_catalog` environnement variable,
...
...
@@ -1127,6 +1135,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
light_install
=
light_install
,
quiet
=
quiet
)
self
.
_updateConversionServerConfiguration
()
self
.
_updateMemcachedConfiguration
()
# Create a Manager user at the Portal level
uf
=
self
.
getPortal
().
acl_users
uf
.
_doAddUser
(
'ERP5TypeTestCase'
,
''
,
[
'Manager'
,
'Member'
,
'Assignee'
,
...
...
product/ERP5Type/tests/testCacheTool.py
View file @
50d38916
...
...
@@ -32,7 +32,7 @@ import unittest
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getPersistentMemcachedServerDict
,
_getVolatileMemcachedServerDict
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
_getPersistentMemcachedServerDict
from
Products.ERP5Type.CachePlugins.DummyCache
import
DummyCache
from
AccessControl.SecurityManagement
import
newSecurityManager
from
Products.ERP5Type.Cache
import
CachingMethod
,
DEFAULT_CACHE_SCOPE
...
...
@@ -96,12 +96,7 @@ class TestCacheTool(ERP5TypeTestCase):
self
.
assertNotEqual
(
None
,
portal_type
)
def
createPersistentMemcachedPlugin
(
self
):
portal_memcached
=
self
.
getPortal
().
portal_memcached
connection_dict
=
_getVolatileMemcachedServerDict
()
url_string
=
'%(hostname)s:%(port)s'
%
connection_dict
# setup default volatile distributed memcached
portal_memcached
.
default_memcached_plugin
.
setUrlString
(
url_string
)
portal_memcached
=
self
.
portal
.
portal_memcached
# setup persistent memcached
memcached_plugin_id
=
'flare'
if
getattr
(
portal_memcached
,
memcached_plugin_id
,
None
)
is
None
:
...
...
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