Commit b0e2ab05 authored by Jérome Perrin's avatar Jérome Perrin Committed by Sebastien Robin

runUnitTest: new zserver_frontend_url to run zelenium tests behind http proxy

parent b3a57dc2
...@@ -138,8 +138,17 @@ class FunctionalTestRunner: ...@@ -138,8 +138,17 @@ class FunctionalTestRunner:
return self.portal.portal_tests.TestTool_getResults(self.run_only) return self.portal.portal_tests.TestTool_getResults(self.run_only)
def _getTestURL(self): def _getTestURL(self):
return ZELENIUM_BASE_URL % (self.portal.portal_url(), self.run_only, # Access the https proxy in front of runUnitTest's zserver
self.user, self.password) 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): def test(self, debug=0):
xvfb = Xvfb(self.instance_home) xvfb = Xvfb(self.instance_home)
......
...@@ -145,6 +145,10 @@ Options: ...@@ -145,6 +145,10 @@ Options:
Make ZServer listen on given host:port Make ZServer listen on given host:port
If used with --activity_node=, this can be a If used with --activity_node=, this can be a
comma-separated list of addresses. 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. --neo_storage Use a NEO storage (SQLite) instead of FileStorage.
--products_path=path,path Comma-separated list of products paths locations --products_path=path,path Comma-separated list of products paths locations
which shall be used in test environment. which shall be used in test environment.
...@@ -727,6 +731,7 @@ def main(argument_list=None): ...@@ -727,6 +731,7 @@ def main(argument_list=None):
"zeo_client=", "zeo_client=",
"zeo_server=", "zeo_server=",
"zserver=", "zserver=",
"zserver_frontend_url=",
"neo_storage", "neo_storage",
"products_path=", "products_path=",
"sys_path=", "sys_path=",
...@@ -839,6 +844,8 @@ def main(argument_list=None): ...@@ -839,6 +844,8 @@ def main(argument_list=None):
os.environ["zeo_server"] = arg os.environ["zeo_server"] = arg
elif opt == "--zserver": elif opt == "--zserver":
os.environ["zserver"] = arg os.environ["zserver"] = arg
elif opt == "--zserver_frontend_url":
os.environ["zserver_frontend_url"] = arg
elif opt == "--neo_storage": elif opt == "--neo_storage":
os.environ["neo_storage"] = "" os.environ["neo_storage"] = ""
elif opt == "--products_path": elif opt == "--products_path":
......
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