diff --git a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py index 5e8b1389418a33b119b6f01b02714e035a6e98ce..c26bd07ca46eafbad0a87d1f00f42696749046b6 100644 --- a/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py +++ b/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py @@ -138,8 +138,17 @@ class FunctionalTestRunner: return self.portal.portal_tests.TestTool_getResults(self.run_only) def _getTestURL(self): - return ZELENIUM_BASE_URL % (self.portal.portal_url(), self.run_only, - self.user, self.password) + # Access the https proxy in front of runUnitTest's zserver + base_url = os.getenv('zserver_frontend_url') + if base_url: + base_url = '%s%s' % (base_url, self.portal.getId()) + else: + base_url = self.portal.portal_url() + return ZELENIUM_BASE_URL % ( + base_url, + self.run_only, + self.user, + self.password) def test(self, debug=0): xvfb = Xvfb(self.instance_home) diff --git a/product/ERP5Type/tests/runUnitTest.py b/product/ERP5Type/tests/runUnitTest.py index a49420e7cee6be22e07df4537a11dedac6a9bb48..7b6c408cce2203c2e25872aa40f81d2c7f269225 100755 --- a/product/ERP5Type/tests/runUnitTest.py +++ b/product/ERP5Type/tests/runUnitTest.py @@ -145,6 +145,10 @@ Options: Make ZServer listen on given host:port If used with --activity_node=, this can be a comma-separated list of addresses. + --zserver_frontend_url=STRING + URL of an http proxy where the zserver is reachable. + When running zelenium tests, the zserver will be + accessed from this URL. --neo_storage Use a NEO storage (SQLite) instead of FileStorage. --products_path=path,path Comma-separated list of products paths locations which shall be used in test environment. @@ -727,6 +731,7 @@ def main(argument_list=None): "zeo_client=", "zeo_server=", "zserver=", + "zserver_frontend_url=", "neo_storage", "products_path=", "sys_path=", @@ -839,6 +844,8 @@ def main(argument_list=None): os.environ["zeo_server"] = arg elif opt == "--zserver": os.environ["zserver"] = arg + elif opt == "--zserver_frontend_url": + os.environ["zserver_frontend_url"] = arg elif opt == "--neo_storage": os.environ["neo_storage"] = "" elif opt == "--products_path":