Commit e79d358e authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_*: Bootstrap caucase server/connector

  Only launch caucase when needed.  Not all tests need
  caucase, this saves a bit the overhead to run it
parent fda21b6b
...@@ -256,6 +256,8 @@ class TestSlapOSComputerConsumptionTioXMLFile_parseXml(SlapOSTestCaseMixinWithAb ...@@ -256,6 +256,8 @@ class TestSlapOSComputerConsumptionTioXMLFile_parseXml(SlapOSTestCaseMixinWithAb
class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration( class TestSlapOSComputerConsumptionTioXMLFile_solveInvoicingGeneration(
SlapOSTestCaseMixin): SlapOSTestCaseMixin):
launch_caucase = 1
def createTioXMLFile(self): def createTioXMLFile(self):
document = self.portal.consumption_document_module.newContent( document = self.portal.consumption_document_module.newContent(
title=self.generateNewId(), title=self.generateNewId(),
......
...@@ -30,6 +30,8 @@ from AccessControl.SecurityManagement import getSecurityManager, \ ...@@ -30,6 +30,8 @@ from AccessControl.SecurityManagement import getSecurityManager, \
class DefaultScenarioMixin(TestSlapOSSecurityMixin): class DefaultScenarioMixin(TestSlapOSSecurityMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
TestSlapOSSecurityMixin.afterSetUp(self) TestSlapOSSecurityMixin.afterSetUp(self)
preference = self.portal.portal_preferences.slapos_default_system_preference preference = self.portal.portal_preferences.slapos_default_system_preference
......
...@@ -44,6 +44,8 @@ def hashData(data): ...@@ -44,6 +44,8 @@ def hashData(data):
class TestSlapOSCloudSlapOSCacheMixin( class TestSlapOSCloudSlapOSCacheMixin(
SlapOSTestCaseMixin): SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
self.pinDateTime(DateTime()) self.pinDateTime(DateTime())
...@@ -374,6 +376,8 @@ class TestSlapOSCloudSlapOSCacheMixin( ...@@ -374,6 +376,8 @@ class TestSlapOSCloudSlapOSCacheMixin(
class TestSlapOSCloudSoftwareInstance( class TestSlapOSCloudSoftwareInstance(
SlapOSTestCaseMixin): SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
self._makeTree() self._makeTree()
...@@ -494,6 +498,7 @@ class TestSlapOSCloudSoftwareInstance( ...@@ -494,6 +498,7 @@ class TestSlapOSCloudSoftwareInstance(
class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation( class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation(
SlapOSTestCaseMixin): SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
...@@ -700,4 +705,3 @@ class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation( ...@@ -700,4 +705,3 @@ class TestSlapOSCloudSlapOSComputeNodeMixin_getCacheComputeNodeInformation(
self.assertEqual(fourth_body_fingerprint, hashData(body)) self.assertEqual(fourth_body_fingerprint, hashData(body))
self.assertEqual(0, len(self.portal.portal_activities.getMessageList())) self.assertEqual(0, len(self.portal.portal_activities.getMessageList()))
...@@ -8,6 +8,8 @@ from erp5.component.module.DateUtils import addToDate ...@@ -8,6 +8,8 @@ from erp5.component.module.DateUtils import addToDate
class TestSlapOSCoreSlapOSAssertInstanceTreeSuccessorAlarm( class TestSlapOSCoreSlapOSAssertInstanceTreeSuccessorAlarm(
SlapOSTestCaseMixin): SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
self._makeTree() self._makeTree()
...@@ -219,6 +221,8 @@ class TestSlapOSFreeComputePartitionAlarmWithSlave(SlapOSTestCaseMixin): ...@@ -219,6 +221,8 @@ class TestSlapOSFreeComputePartitionAlarmWithSlave(SlapOSTestCaseMixin):
class TestSlapOSGarbageCollectDestroyedRootTreeAlarm(SlapOSTestCaseMixin): class TestSlapOSGarbageCollectDestroyedRootTreeAlarm(SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
self._makeTree() self._makeTree()
...@@ -527,6 +531,8 @@ class TestSlapOSUpdateComputeNodeCapacityScopeAlarm(SlapOSTestCaseMixin): ...@@ -527,6 +531,8 @@ class TestSlapOSUpdateComputeNodeCapacityScopeAlarm(SlapOSTestCaseMixin):
class TestSlapOSGarbageCollectStoppedRootTreeAlarm(SlapOSTestCaseMixin): class TestSlapOSGarbageCollectStoppedRootTreeAlarm(SlapOSTestCaseMixin):
launch_caucase = 1
def createInstance(self): def createInstance(self):
instance_tree = self.portal.instance_tree_module\ instance_tree = self.portal.instance_tree_module\
.template_instance_tree.Base_createCloneDocument(batch_mode=1) .template_instance_tree.Base_createCloneDocument(batch_mode=1)
...@@ -612,6 +618,8 @@ class TestSlapOSGarbageCollectStoppedRootTreeAlarm(SlapOSTestCaseMixin): ...@@ -612,6 +618,8 @@ class TestSlapOSGarbageCollectStoppedRootTreeAlarm(SlapOSTestCaseMixin):
class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(SlapOSTestCaseMixin): class TestSlapOSGarbageCollectNonAllocatedRootTreeAlarm(SlapOSTestCaseMixin):
launch_caucase = 1
def createInstance(self): def createInstance(self):
instance_tree = self.portal.instance_tree_module\ instance_tree = self.portal.instance_tree_module\
.template_instance_tree.Base_createCloneDocument(batch_mode=1) .template_instance_tree.Base_createCloneDocument(batch_mode=1)
......
...@@ -27,6 +27,9 @@ from Products.ERP5Type.Errors import UnsupportedWorkflowMethod ...@@ -27,6 +27,9 @@ from Products.ERP5Type.Errors import UnsupportedWorkflowMethod
class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin): class TestSlapOSCoreComputeNodeSlapInterfaceWorkflow(SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
# Clone compute_node document # Clone compute_node document
...@@ -791,8 +794,6 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflowSupply(SlapOSTestCaseMixin): ...@@ -791,8 +794,6 @@ class TestSlapOSCoreComputeNodeSlapInterfaceWorkflowSupply(SlapOSTestCaseMixin):
class TestSlapOSCoreComputeNodeSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin): class TestSlapOSCoreComputeNodeSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
portal = self.getPortalObject() portal = self.getPortalObject()
......
...@@ -28,6 +28,8 @@ from zExceptions import Unauthorized ...@@ -28,6 +28,8 @@ from zExceptions import Unauthorized
class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin): class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
"""Tests instance.requestInstance""" """Tests instance.requestInstance"""
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
portal = self.getPortalObject() portal = self.getPortalObject()
...@@ -1045,6 +1047,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin): ...@@ -1045,6 +1047,7 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflow(SlapOSTestCaseMixin):
class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin): class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
"""Tests instance.requestTransfer""" """Tests instance.requestTransfer"""
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
...@@ -1403,4 +1406,3 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin): ...@@ -1403,4 +1406,3 @@ class TestSlapOSCoreInstanceSlapInterfaceWorkflowTransfer(SlapOSTestCaseMixin):
self.assertNotEqual(certificate_login.getDestinationReference(), self.assertNotEqual(certificate_login.getDestinationReference(),
another_certificate_login.getDestinationReference()) another_certificate_login.getDestinationReference())
...@@ -26,6 +26,7 @@ from AccessControl.SecurityManagement import getSecurityManager, \ ...@@ -26,6 +26,7 @@ from AccessControl.SecurityManagement import getSecurityManager, \
class TestSlapOSCorePersonRequest(SlapOSTestCaseMixin): class TestSlapOSCorePersonRequest(SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
......
...@@ -1075,6 +1075,7 @@ class TestSlapOSRegularisationRequest_stopInstanceTreeList( ...@@ -1075,6 +1075,7 @@ class TestSlapOSRegularisationRequest_stopInstanceTreeList(
class TestSlapOSInstanceTree_stopFromRegularisationRequest( class TestSlapOSInstanceTree_stopFromRegularisationRequest(
SlapOSTestCaseMixinWithAbort): SlapOSTestCaseMixinWithAbort):
launch_caucase = 1
def createInstanceTree(self): def createInstanceTree(self):
new_id = self.generateNewId() new_id = self.generateNewId()
instance_tree = self.portal.instance_tree_module\ instance_tree = self.portal.instance_tree_module\
......
...@@ -104,6 +104,8 @@ class TestCRMSkinsMixin(SlapOSTestCaseMixinWithAbort): ...@@ -104,6 +104,8 @@ class TestCRMSkinsMixin(SlapOSTestCaseMixinWithAbort):
class TestSlapOSSupportRequestModule_getMonitoringUrlList(TestCRMSkinsMixin): class TestSlapOSSupportRequestModule_getMonitoringUrlList(TestCRMSkinsMixin):
launch_caucase = 1
def test_SupportRequestModule_getMonitoringUrlList(self): def test_SupportRequestModule_getMonitoringUrlList(self):
module = self.portal.support_request_module module = self.portal.support_request_module
# We assume here that several objects created by others tests don't influentiate # We assume here that several objects created by others tests don't influentiate
...@@ -333,6 +335,8 @@ class TestSlapOSisSupportRequestCreationClosed(TestCRMSkinsMixin): ...@@ -333,6 +335,8 @@ class TestSlapOSisSupportRequestCreationClosed(TestCRMSkinsMixin):
class TestSlapOSComputeNode_CheckState(TestCRMSkinsMixin): class TestSlapOSComputeNode_CheckState(TestCRMSkinsMixin):
launch_caucase = 1
def beforeTearDown(self): def beforeTearDown(self):
self._cancelTestSupportRequestList() self._cancelTestSupportRequestList()
transaction.abort() transaction.abort()
...@@ -635,6 +639,8 @@ class TestSlapOSInstanceTree_createSupportRequestEvent(SlapOSTestCaseMixin): ...@@ -635,6 +639,8 @@ class TestSlapOSInstanceTree_createSupportRequestEvent(SlapOSTestCaseMixin):
class TestSlapOSHasError(SlapOSTestCaseMixin): class TestSlapOSHasError(SlapOSTestCaseMixin):
launch_caucase = 1
def _makeSoftwareRelease(self, software_release_url=None): def _makeSoftwareRelease(self, software_release_url=None):
software_release = self.portal.software_release_module\ software_release = self.portal.software_release_module\
.template_software_release.Base_createCloneDocument(batch_mode=1) .template_software_release.Base_createCloneDocument(batch_mode=1)
......
...@@ -598,6 +598,7 @@ class TestPerson_newLogin(TestSlapOSHalJsonStyleMixin): ...@@ -598,6 +598,7 @@ class TestPerson_newLogin(TestSlapOSHalJsonStyleMixin):
self.assertIn(person.getRelativeUrl(), result) self.assertIn(person.getRelativeUrl(), result)
class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin): class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin):
launch_caucase = 1
def test_Person_getCertificate_unauthorized(self): def test_Person_getCertificate_unauthorized(self):
person = self._makePerson(user=1) person = self._makePerson(user=1)
self.assertEqual(1 , len(person.objectValues(portal_type="ERP5 Login"))) self.assertEqual(1 , len(person.objectValues(portal_type="ERP5 Login")))
...@@ -635,7 +636,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin): ...@@ -635,7 +636,7 @@ class TestPerson_get_Certificate(TestSlapOSHalJsonStyleMixin):
self.assertSameSet(new_response_dict.keys(), ["common_name", "certificate", "id", "key"]) self.assertSameSet(new_response_dict.keys(), ["common_name", "certificate", "id", "key"])
self.assertEqual(json.dumps(new_response_dict["common_name"]), json.dumps(new_login.getReference())) self.assertEqual(json.dumps(new_response_dict["common_name"]), json.dumps(new_login.getReference()))
self.assertEqual(new_response_dict["id"], new_login.getDestinationReference()) self.assertEqual(new_response_dict["id"], new_login.getSourceReference())
self.assertNotEqual(new_response_dict["common_name"], response_dict["common_name"]) self.assertNotEqual(new_response_dict["common_name"], response_dict["common_name"])
self.assertNotEqual(new_response_dict["id"], response_dict["id"]) self.assertNotEqual(new_response_dict["id"], response_dict["id"])
...@@ -700,6 +701,7 @@ class TestERP5Site_invalidate(TestSlapOSHalJsonStyleMixin): ...@@ -700,6 +701,7 @@ class TestERP5Site_invalidate(TestSlapOSHalJsonStyleMixin):
class TestComputeNode_get_revoke_Certificate(TestSlapOSHalJsonStyleMixin): class TestComputeNode_get_revoke_Certificate(TestSlapOSHalJsonStyleMixin):
launch_caucase = 1
def test_ComputeNode_getCertificate(self): def test_ComputeNode_getCertificate(self):
compute_node = self._makeComputeNode() compute_node = self._makeComputeNode()
self.assertEqual(0, len(compute_node.objectValues(portal_type=["ERP5 Login", "Certificate Login"]))) self.assertEqual(0, len(compute_node.objectValues(portal_type=["ERP5 Login", "Certificate Login"])))
...@@ -1572,6 +1574,8 @@ return []""") ...@@ -1572,6 +1574,8 @@ return []""")
class TestSoftwareInstance_getAllocationInformation(TestSlapOSHalJsonStyleMixin): class TestSoftwareInstance_getAllocationInformation(TestSlapOSHalJsonStyleMixin):
launch_caucase = 1
def test_SoftwareInstance_getAllocationInformation_not_allocated(self): def test_SoftwareInstance_getAllocationInformation_not_allocated(self):
self._makeTree() self._makeTree()
self.changeSkin('RJS') self.changeSkin('RJS')
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctiona ...@@ -32,6 +32,7 @@ from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctiona
class TestSlapOSUIHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase): class TestSlapOSUIHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase):
foreground = 0 foreground = 0
run_only = "slaposjs_zuite" run_only = "slaposjs_zuite"
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
ERP5TypeFunctionalTestCase.afterSetUp(self) ERP5TypeFunctionalTestCase.afterSetUp(self)
......
...@@ -32,6 +32,7 @@ from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctiona ...@@ -32,6 +32,7 @@ from Products.ERP5Type.tests.ERP5TypeFunctionalTestCase import ERP5TypeFunctiona
class TestSlapOSUIZHHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase): class TestSlapOSUIZHHalStyle(SlapOSTestCaseMixin, ERP5TypeFunctionalTestCase):
foreground = 0 foreground = 0
run_only = "slaposjs_zuite" run_only = "slaposjs_zuite"
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
ERP5TypeFunctionalTestCase.afterSetUp(self) ERP5TypeFunctionalTestCase.afterSetUp(self)
......
...@@ -24,6 +24,9 @@ from DateTime import DateTime ...@@ -24,6 +24,9 @@ from DateTime import DateTime
import transaction import transaction
class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins): class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
launch_caucase = 1
def _makeSoftwareProductCatalog(self): def _makeSoftwareProductCatalog(self):
self.software_product = self._makeSoftwareProduct(self.generateNewId()) self.software_product = self._makeSoftwareProduct(self.generateNewId())
self.previous_software_release = self._makeSoftwareRelease(self.generateNewId()) self.previous_software_release = self._makeSoftwareRelease(self.generateNewId())
...@@ -426,4 +429,4 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins): ...@@ -426,4 +429,4 @@ class TestSlapOSPDMCreateUpgradeDecisionSkins(TestSlapOSPDMMixinSkins):
release = decision2.UpgradeDecision_getAggregateValue("Software Release") release = decision2.UpgradeDecision_getAggregateValue("Software Release")
self.assertEqual(release.getUrlString(), self.assertEqual(release.getUrlString(),
software_release3.getUrlString()) software_release3.getUrlString())
\ No newline at end of file
...@@ -23,6 +23,9 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin ...@@ -23,6 +23,9 @@ from erp5.component.test.SlapOSTestCaseMixin import SlapOSTestCaseMixin
from erp5.component.test.testSlapOSAccountingAlarm import simulateByEditWorkflowMark from erp5.component.test.testSlapOSAccountingAlarm import simulateByEditWorkflowMark
class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(SlapOSTestCaseMixin): class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(SlapOSTestCaseMixin):
launch_caucase = 1
def createInstance(self, url_string): def createInstance(self, url_string):
instance_tree = self.portal.instance_tree_module\ instance_tree = self.portal.instance_tree_module\
.template_instance_tree.Base_createCloneDocument(batch_mode=1) .template_instance_tree.Base_createCloneDocument(batch_mode=1)
...@@ -110,8 +113,6 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap ...@@ -110,8 +113,6 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
aggregate=compute_node.getRelativeUrl()) aggregate=compute_node.getRelativeUrl())
published_software_installation.validate() published_software_installation.validate()
published_software_installation.requestStart() published_software_installation.requestStart()
self.tic() self.tic()
# first run touches software installation # first run touches software installation
...@@ -195,8 +196,6 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap ...@@ -195,8 +196,6 @@ class TestSlapOSDestroySoftwareInstallationWithArchivedSoftwareReleaseAlarm(Slap
aggregate=compute_node.getRelativeUrl()) aggregate=compute_node.getRelativeUrl())
published_software_installation.validate() published_software_installation.validate()
published_software_installation.requestStart() published_software_installation.requestStart()
self.tic() self.tic()
# as Compute Node is manually managed, nothing happens # as Compute Node is manually managed, nothing happens
......
...@@ -49,6 +49,7 @@ def canonical_xml(xml): ...@@ -49,6 +49,7 @@ def canonical_xml(xml):
class TestSlapOSSlapToolMixin(SlapOSTestCaseMixin): class TestSlapOSSlapToolMixin(SlapOSTestCaseMixin):
launch_caucase = 1
def afterSetUp(self): def afterSetUp(self):
SlapOSTestCaseMixin.afterSetUp(self) SlapOSTestCaseMixin.afterSetUp(self)
self.portal_slap = self.portal.portal_slap self.portal_slap = self.portal.portal_slap
......
...@@ -637,6 +637,8 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti ...@@ -637,6 +637,8 @@ class TestSubscriptionRequest_createRelatedSaleInvoiceTransaction(TestSubscripti
class SubscriptionRequest_processRequest(TestSubscriptionSkinsMixin): class SubscriptionRequest_processRequest(TestSubscriptionSkinsMixin):
launch_caucase = 1
def test_process_request_person_is_none(self): def test_process_request_person_is_none(self):
subscription_request = self.newSubscriptionRequest(quantity=1) subscription_request = self.newSubscriptionRequest(quantity=1)
self.assertEqual(None, subscription_request.SubscriptionRequest_processRequest()) self.assertEqual(None, subscription_request.SubscriptionRequest_processRequest())
...@@ -1054,6 +1056,8 @@ class TestSubscriptionRequest_verifyReservationPaymentTransaction(TestSubscripti ...@@ -1054,6 +1056,8 @@ class TestSubscriptionRequest_verifyReservationPaymentTransaction(TestSubscripti
class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin): class TestSubscriptionRequest_processOrdered(TestSubscriptionSkinsMixin):
launch_caucase = 1
def test_no_sale_invoice(self): def test_no_sale_invoice(self):
person = self.makePerson() person = self.makePerson()
subscription_request = self.newSubscriptionRequest( subscription_request = self.newSubscriptionRequest(
......
...@@ -30,6 +30,7 @@ import random ...@@ -30,6 +30,7 @@ import random
import transaction import transaction
import unittest import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.ERP5TypeCaucaseTestCase import ERP5TypeCaucaseTestCase
from Products.ERP5Type.Utils import convertToUpperCase from Products.ERP5Type.Utils import convertToUpperCase
import os import os
import glob import glob
...@@ -40,9 +41,10 @@ from App.config import getConfiguration ...@@ -40,9 +41,10 @@ from App.config import getConfiguration
config = getConfiguration() config = getConfiguration()
class testSlapOSMixin(ERP5TypeTestCase): class testSlapOSMixin(ERP5TypeCaucaseTestCase):
abort_transaction = 0 abort_transaction = 0
launch_caucase = 0
def clearCache(self): def clearCache(self):
self.portal.portal_caches.clearAllCache() self.portal.portal_caches.clearAllCache()
...@@ -86,6 +88,8 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -86,6 +88,8 @@ class testSlapOSMixin(ERP5TypeTestCase):
self.portal.email_from_address = 'romain@nexedi.com' self.portal.email_from_address = 'romain@nexedi.com'
self.portal.email_to_address = 'romain@nexedi.com' self.portal.email_to_address = 'romain@nexedi.com'
if not self.isLiveTest() and self.launch_caucase:
self.setUpCaucase()
if getattr(self.portal.portal_caches, 'erp5_site_global_id', None): if getattr(self.portal.portal_caches, 'erp5_site_global_id', None):
# we are not on live test so multiple tests can run in parallel # we are not on live test so multiple tests can run in parallel
...@@ -93,8 +97,6 @@ class testSlapOSMixin(ERP5TypeTestCase): ...@@ -93,8 +97,6 @@ class testSlapOSMixin(ERP5TypeTestCase):
self.portal.portal_caches.erp5_site_global_id = '%s' % random.random() self.portal.portal_caches.erp5_site_global_id = '%s' % random.random()
self.portal.portal_caches._p_changed = 1 self.portal.portal_caches._p_changed = 1
if self.isLiveTest():
return
self.commit() self.commit()
self.portal.portal_caches.updateCache() self.portal.portal_caches.updateCache()
......
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