Commit 6cd9c2bf authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branch 'upstream/master' into zope4py2

parents 0703d36b 6db6993a
Pipeline #23493 failed with stage
in 0 seconds
...@@ -19,6 +19,14 @@ parts = ...@@ -19,6 +19,14 @@ parts =
part = python2.7 part = python2.7
[open62541] [open62541]
configure-options =
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
-DUA_ENABLE_PUBSUB=ON
-DUA_ENABLE_SUBSCRIPTIONS=ON
-DUA_NAMESPACE_ZERO=REDUCED
# Beremiz need it to be in folder parts/open62541 # Beremiz need it to be in folder parts/open62541
# as Beremiz search for open62541 to BEREMIZ_PATH/../open62541 # as Beremiz search for open62541 to BEREMIZ_PATH/../open62541
shared = false shared = false
......
...@@ -119,6 +119,11 @@ class ERP5UpgradeTestCase(SlapOSInstanceTestCase): ...@@ -119,6 +119,11 @@ class ERP5UpgradeTestCase(SlapOSInstanceTestCase):
class TestERP5Upgrade(ERP5UpgradeTestCase): class TestERP5Upgrade(ERP5UpgradeTestCase):
@classmethod
def tearDownClass(cls):
cls.session.close()
super().tearDownClass()
@classmethod @classmethod
def setUpOldInstance(cls): def setUpOldInstance(cls):
cls._default_instance_old_parameter_dict = param_dict = json.loads( cls._default_instance_old_parameter_dict = param_dict = json.loads(
......
...@@ -162,18 +162,19 @@ class EdgeMixin(object): ...@@ -162,18 +162,19 @@ class EdgeMixin(object):
) )
for instance_reference in self.surykatka_dict: for instance_reference in self.surykatka_dict:
for info_dict in self.surykatka_dict[instance_reference].values(): for info_dict in self.surykatka_dict[instance_reference].values():
with open(info_dict['ini-file']) as fh:
self.assertEqual( self.assertEqual(
info_dict['expected_ini'].strip() % info_dict, info_dict['expected_ini'].strip() % info_dict,
open(info_dict['ini-file']).read().strip() fh.read().strip()
) )
def assertPromiseContent(self, instance_reference, name, content): def assertPromiseContent(self, instance_reference, name, content):
promise = open( with open(
os.path.join( os.path.join(
self.slap.instance_directory, instance_reference, 'etc', 'plugin', name self.slap.instance_directory, instance_reference, 'etc', 'plugin', name
)).read().strip() )) as fh:
promise = fh.read().strip()
self.assertTrue(content in promise) self.assertIn(content, promise)
def assertSurykatkaBotPromise(self): def assertSurykatkaBotPromise(self):
for instance_reference in self.surykatka_dict: for instance_reference in self.surykatka_dict:
...@@ -190,9 +191,10 @@ class EdgeMixin(object): ...@@ -190,9 +191,10 @@ class EdgeMixin(object):
def assertSurykatkaCron(self): def assertSurykatkaCron(self):
for instance_reference in self.surykatka_dict: for instance_reference in self.surykatka_dict:
for info_dict in self.surykatka_dict[instance_reference].values(): for info_dict in self.surykatka_dict[instance_reference].values():
with open(info_dict['status-cron']) as fh:
self.assertEqual( self.assertEqual(
'*/2 * * * * %s' % (info_dict['status-json'],), '*/2 * * * * %s' % (info_dict['status-json'],),
open(info_dict['status-cron']).read().strip() fh.read().strip()
) )
def initiateSurykatkaRun(self): def initiateSurykatkaRun(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment