Skip to content

Commit

Permalink
Merge pull request #17 from totem/develop
Browse files Browse the repository at this point in the history
0.1.10 Release
  • Loading branch information
sukrit007 committed Mar 24, 2015
2 parents 669cbd4 + f06cc0d commit 5f752fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deployer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.1.9'
__version__ = '0.1.10'
__author__ = 'sukrit'

import logging
Expand Down
2 changes: 1 addition & 1 deletion deployer/services/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _check_celery():
return 'Celery ping:%s' % output


def get_health(check_celery=False):
def get_health(check_celery=True):
"""
Gets the health of the all the external services.
Expand Down
2 changes: 1 addition & 1 deletion deployer/views/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def get(self, **kwargs):
:return: Flask Json Response containing version.
"""
check_celery = request.args.get('celery', 'false').lower() in \
check_celery = request.args.get('celery', 'true').lower() in \
BOOLEAN_TRUE_VALUES
health = get_health(check_celery)
failed_checks = [
Expand Down
12 changes: 11 additions & 1 deletion tests/unit/services/test_health.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def test_get_health_when_elasticsearch_is_enabled(client, get_es, ping):
"""

# Given: Operational external services"
ping.delay().get.return_value = 'pong'
get_es().info.return_value = 'mock'
EtcdInfo = namedtuple('Info', ('machines', 'leader'))
client.Client.return_value = EtcdInfo(['machine1'], 'machine1')
Expand All @@ -46,6 +47,10 @@ def test_get_health_when_elasticsearch_is_enabled(client, get_es, ping):
'elasticsearch': {
'status': HEALTH_OK,
'details': 'mock'
},
'celery': {
'status': HEALTH_OK,
'details': 'Celery ping:pong'
}
})

Expand All @@ -61,6 +66,7 @@ def test_get_health_when_elasticsearch_is_disabled(client, ping):
"""

# Given: Operational external services"
ping.delay().get.return_value = 'pong'
EtcdInfo = namedtuple('Info', ('machines', 'leader'))
client.Client.return_value = EtcdInfo(['machine1'], 'machine1')

Expand All @@ -75,7 +81,11 @@ def test_get_health_when_elasticsearch_is_disabled(client, ping):
'machines': ['machine1'],
'leader': 'machine1'
}
}
},
'celery': {
'status': HEALTH_OK,
'details': 'Celery ping:pong'
},
})


Expand Down

0 comments on commit 5f752fe

Please sign in to comment.