mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Disable proxy setting for test-backend and test-js-with-casper.
This fixes the fact that our test suites would have trouble connecting to the other parts of the Zulip service when run with a proxy configuration (e.g. trying to send requests to localhost through the proxy!). Thanks for Vishnu Ks for his work on this. Fixes #971.
This commit is contained in:
@@ -16,6 +16,8 @@ import glob
|
|||||||
|
|
||||||
os.environ["CASPER_TESTS"] = "1"
|
os.environ["CASPER_TESTS"] = "1"
|
||||||
os.environ["PHANTOMJS_EXECUTABLE"] = os.path.join(os.path.dirname(__file__), "../node_modules/.bin/phantomjs")
|
os.environ["PHANTOMJS_EXECUTABLE"] = os.path.join(os.path.dirname(__file__), "../node_modules/.bin/phantomjs")
|
||||||
|
os.environ["http_proxy"] = ""
|
||||||
|
os.environ["https_proxy"] = ""
|
||||||
|
|
||||||
usage = """%prog [options]
|
usage = """%prog [options]
|
||||||
test-js-with-casper # Run all test files
|
test-js-with-casper # Run all test files
|
||||||
|
|||||||
@@ -113,6 +113,11 @@ if __name__ == "__main__":
|
|||||||
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
TOOLS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(os.path.dirname(TOOLS_DIR))
|
os.chdir(os.path.dirname(TOOLS_DIR))
|
||||||
sys.path.insert(0, os.path.dirname(TOOLS_DIR))
|
sys.path.insert(0, os.path.dirname(TOOLS_DIR))
|
||||||
|
|
||||||
|
# Remove proxy settings for running backend tests
|
||||||
|
os.environ["http_proxy"] = ""
|
||||||
|
os.environ["https_proxy"] = ""
|
||||||
|
|
||||||
from zerver.lib.test_fixtures import is_template_database_current
|
from zerver.lib.test_fixtures import is_template_database_current
|
||||||
|
|
||||||
from tools.lib.test_script import (
|
from tools.lib.test_script import (
|
||||||
|
|||||||
Reference in New Issue
Block a user