mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Cleanup
This commit is contained in:
parent
d7fa363673
commit
f04a7d5056
@ -1,3 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
"""
|
"""
|
||||||
uWSGI stats server http://uwsgi-docs.readthedocs.org/en/latest/StatsServer.html
|
uWSGI stats server http://uwsgi-docs.readthedocs.org/en/latest/StatsServer.html
|
||||||
|
|
||||||
@ -36,6 +37,6 @@ def stats(socket):
|
|||||||
salt '*' uwsgi.stats 127.0.0.1:5050
|
salt '*' uwsgi.stats 127.0.0.1:5050
|
||||||
"""
|
"""
|
||||||
|
|
||||||
cmd = 'uwsgi --connect-and-read {}'.format(socket)
|
cmd = 'uwsgi --connect-and-read {0}'.format(socket)
|
||||||
out = __salt__['cmd.run'](cmd)
|
out = __salt__['cmd.run'](cmd)
|
||||||
return json.loads(out)
|
return json.loads(out)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import urllib2
|
|
||||||
# Import Salt Testing libs
|
# Import Salt Testing libs
|
||||||
from salttesting import skipIf, TestCase
|
from salttesting import skipIf, TestCase
|
||||||
from salttesting.helpers import ensure_in_syspath
|
from salttesting.helpers import ensure_in_syspath
|
||||||
@ -12,14 +11,6 @@ ensure_in_syspath('../../')
|
|||||||
|
|
||||||
uwsgi.__salt__ = {}
|
uwsgi.__salt__ = {}
|
||||||
|
|
||||||
class MockUrllibStatus(object):
|
|
||||||
"""Mock of urllib2 call for Nginx status"""
|
|
||||||
def read(self):
|
|
||||||
return MOCK_STATUS_OUTPUT
|
|
||||||
|
|
||||||
def close(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
@skipIf(NO_MOCK, NO_MOCK_REASON)
|
||||||
@patch('salt.utils.which', Mock(return_value='/usr/bin/uwsgi'))
|
@patch('salt.utils.which', Mock(return_value='/usr/bin/uwsgi'))
|
||||||
class UwsgiTestCase(TestCase):
|
class UwsgiTestCase(TestCase):
|
||||||
|
Loading…
Reference in New Issue
Block a user