Commit 872cb67c authored by Jérome Perrin's avatar Jérome Perrin Committed by Rafael Monnerat

runUnitTest: new zserver_frontend_url to run zelenium tests behind http proxy

parent 09e794c2
......@@ -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)
......
......@@ -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":
......
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