diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py index 4c3dbc282d..cf560bd7fe 100644 --- a/zerver/lib/logging_util.py +++ b/zerver/lib/logging_util.py @@ -49,4 +49,4 @@ class ReturnTrue(logging.Filter): class RequireReallyDeployed(logging.Filter): def filter(self, record): from django.conf import settings - return settings.DEPLOYED and not settings.TESTING_DEPLOYED + return settings.DEPLOYED diff --git a/zproject/local_settings.py b/zproject/local_settings.py index 4da5c2f2d0..aaf9bd48e9 100644 --- a/zproject/local_settings.py +++ b/zproject/local_settings.py @@ -11,7 +11,6 @@ config_file.read("/etc/zulip/zulip.conf") # and as such should not for example assume they are the main Zulip site. DEPLOYED = config_file.has_option('machine', 'deploy_type') STAGING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'staging' -TESTING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'test' ENTERPRISE = DEPLOYED and config_file.get('machine', 'deploy_type') == 'enterprise' @@ -36,9 +35,7 @@ NOREPLY_EMAIL_ADDRESS = "noreply@zulip.com" SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer" -if TESTING_DEPLOYED: - EXTERNAL_HOST = platform.node() -elif STAGING_DEPLOYED: +if STAGING_DEPLOYED: EXTERNAL_HOST = 'staging.zulip.com' elif DEPLOYED: EXTERNAL_HOST = 'zulip.com' @@ -96,18 +93,13 @@ AUTHENTICATION_BACKENDS = ('zproject.backends.EmailAuthBackend', # ALLOWED_HOSTS is used by django to determine which addresses # Zulip can serve. This is a security measure. -if TESTING_DEPLOYED: - # Allow any hosts for our test instances, to reduce 500 spam - ALLOWED_HOSTS = ['*'] -else: - # Deployed on zulip.com - ALLOWED_HOSTS = ['localhost', '.humbughq.com', '54.214.48.144', '54.213.44.54', - '54.213.41.54', '54.213.44.58', '54.213.44.73', - '54.200.19.65', '54.201.95.104', '54.201.95.206', - '54.201.186.29', '54.200.111.22', - '54.245.120.64', '54.213.44.83', '.zulip.com', '.zulip.net', - 'chat.dropboxer.net', - ] +# The following are the zulip.com hosts +ALLOWED_HOSTS = ['localhost', '.humbughq.com', '54.214.48.144', '54.213.44.54', + '54.213.41.54', '54.213.44.58', '54.213.44.73', + '54.200.19.65', '54.201.95.104', '54.201.95.206', + '54.201.186.29', '54.200.111.22', + '54.245.120.64', '54.213.44.83', '.zulip.com', '.zulip.net', + 'chat.dropboxer.net'] JWT_AUTH_KEYS = {} diff --git a/zproject/settings.py b/zproject/settings.py index 101ae7504b..270daac260 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -28,7 +28,6 @@ DEPLOYED = config_file.has_option('machine', 'deploy_type') # Zulip run by Zulip, Inc. We will eventually be able to get rid of # them and just have the DEPLOYED flag, but we need them for now. STAGING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'staging' -TESTING_DEPLOYED = DEPLOYED and config_file.get('machine', 'deploy_type') == 'test' ENTERPRISE = DEPLOYED and config_file.get('machine', 'deploy_type') == 'enterprise' secrets_file = ConfigParser.RawConfigParser() @@ -274,7 +273,7 @@ CACHES = { ######################################################################## LOCAL_STATSD = (False) -USING_STATSD = (DEPLOYED and not TESTING_DEPLOYED and not ENTERPRISE) or LOCAL_STATSD +USING_STATSD = (DEPLOYED and not ENTERPRISE) or LOCAL_STATSD # These must be named STATSD_PREFIX for the statsd module # to pick them up