add path needed for unittest to find redis on centos 6.5

This commit is contained in:
Chris Meyers 2015-07-29 16:16:00 -04:00
parent 34ecd4e5b6
commit 456f460ed9

View File

@ -56,8 +56,12 @@ class QueueTestMixin(object):
def start_redis(self):
if not getattr(self, 'redis_process', None):
# Centos 6.5 redis is runnable by non-root user but is not in a normal users path by default
env = dict(os.environ)
env['PATH'] = '%s:/usr/sbin/' % env['PATH']
self.redis_process = Popen('redis-server --port 16379 > /dev/null',
shell=True, executable='/bin/bash')
shell=True, executable='/bin/bash',
env=env)
def stop_redis(self):
if getattr(self, 'redis_process', None):