From 1cce87b136af8b09bb81e2f22e57adb8f63ffd89 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 20 Jan 2015 16:58:29 -0500 Subject: [PATCH] Add is_testing info and mirror the moved endpoints so we can migrate safely. --- endpoints/web.py | 4 ++++ health/healthcheck.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/endpoints/web.py b/endpoints/web.py index 55d5cd0a7..c33308973 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -156,6 +156,8 @@ def v1(): return index('') +# TODO(jschorr): Remove this mirrored endpoint once we migrate ELB. +@web.route('/health', methods=['GET']) @web.route('/health/instance', methods=['GET']) @no_cache def instance_health(): @@ -166,6 +168,8 @@ def instance_health(): return response +# TODO(jschorr): Remove this mirrored endpoint once we migrate pingdom. +@web.route('/status', methods=['GET']) @web.route('/health/endtoend', methods=['GET']) @no_cache def endtoend_health(): diff --git a/health/healthcheck.py b/health/healthcheck.py index aa4c48199..11a365e34 100644 --- a/health/healthcheck.py +++ b/health/healthcheck.py @@ -51,7 +51,8 @@ class HealthCheck(object): data = { 'services': service_statuses, - 'notes': notes + 'notes': notes, + 'is_testing': self.app.config['TESTING'] } return (data, 200 if is_healthy else 503)