Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
tornado: Be more explicit about tornado configuration in testing.
Alex Vandiver922940e223ba
diff --git a/tools/lib/test_server.py b/tools/lib/test_server.pyindex 86c5e20cb4f..b9637fcce42 100644--- a/tools/lib/test_server.py+++ b/tools/lib/test_server.py@@ -24,8 +24,8 @@ from zerver.lib.test_fixtures import update_test_databases_if_requireddef set_up_django(external_host: str) -> None:+ os.environ['FULL_STACK_ZULIP_TEST'] = '1'os.environ['EXTERNAL_HOST'] = external_host- os.environ["TORNADO_SERVER"] = "http://127.0.0.1:9983"os.environ["LOCAL_UPLOADS_DIR"] = get_or_create_dev_uuid_var_path('test-backend/test_uploads')os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.test_settings'diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.pyindex 9d1a3f69d28..ff9b9862bf4 100644--- a/zproject/test_extra_settings.py+++ b/zproject/test_extra_settings.py@@ -1,5 +1,5 @@import os-from typing import Dict, List, Tuple+from typing import Dict, List, Optional, Tupleimport ldapfrom django_auth_ldap.config import LDAPSearch@@ -17,6 +17,10 @@ from .settings import (WEBPACK_LOADER,)+FULL_STACK_ZULIP_TEST = "FULL_STACK_ZULIP_TEST" in os.environ+PUPPETEER_TESTS = "PUPPETEER_TESTS" in os.environ++FAKE_EMAIL_DOMAIN = "zulip.testserver"# Clear out the REALM_HOSTS set in dev_settings.py@@ -36,16 +40,15 @@ DATABASES["default"] = {"OPTIONS": {"connection_factory": TimeTrackingConnection},}-TORNADO_SERVER = os.environ.get("TORNADO_SERVER")-if TORNADO_SERVER is not None:- # This covers the Casper test suite case- pass+# Tests don't use Tornado by default+TORNADO_SERVER: Optional[str] = None++if FULL_STACK_ZULIP_TEST:+ TORNADO_SERVER = "http://127.0.0.1:9983"else:- # This covers the backend test suite caseCAMO_URI = 'https://external-content.zulipcdn.net/external_content/'CAMO_KEY = 'dummy'-PUPPETEER_TESTS = "PUPPETEER_TESTS" in os.environif PUPPETEER_TESTS:# Disable search pills prototype for production useSEARCH_PILLS_ENABLED = False