creating constants
This commit is contained in:
parent
6df8e39bb1
commit
9d97d568ec
6 changed files with 34 additions and 24 deletions
|
|
@ -14,12 +14,12 @@ def test_daemonize_haproxy_check_config():
|
|||
|
||||
def test_daemonize_haproxy_get_haproxy_command_start():
|
||||
daemon = DaemonizeHAProxy()
|
||||
command = daemon.get_haproxy_command("start")
|
||||
command = daemon.get_haproxy_command(DaemonizeHAProxy.HAPROXY_START)
|
||||
assert command == "/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -S /var/run/haproxy.sock"
|
||||
|
||||
def test_daemonize_haproxy_get_haproxy_command_reload():
|
||||
daemon = DaemonizeHAProxy()
|
||||
command = daemon.get_haproxy_command("reload")
|
||||
command = daemon.get_haproxy_command(DaemonizeHAProxy.HAPROXY_RELOAD)
|
||||
assert command == "/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -x /var/run/haproxy.sock -sf "
|
||||
|
||||
def test_daemonize_haproxy_check_config():
|
||||
|
|
@ -32,7 +32,7 @@ def test_daemonize_haproxy_check_config():
|
|||
|
||||
def test_daemonize_haproxy_get_haproxy_command_start():
|
||||
daemon = DaemonizeHAProxy(os.path.abspath(os.path.dirname(__file__)) + '/fixtures')
|
||||
command = daemon.get_haproxy_command("start")
|
||||
command = daemon.get_haproxy_command(DaemonizeHAProxy.HAPROXY_START)
|
||||
assert command == "/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -f %s -p /run/haproxy.pid -S /var/run/haproxy.sock" % (os.path.dirname(__file__) + "/fixtures")
|
||||
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ def test_daemonize_haproxy_get_haproxy_command_reload():
|
|||
|
||||
try:
|
||||
daemon = DaemonizeHAProxy(os.path.abspath(os.path.dirname(__file__)) + '/fixtures')
|
||||
command = daemon.get_haproxy_command("reload", tmp_pid_file)
|
||||
command = daemon.get_haproxy_command(DaemonizeHAProxy.HAPROXY_RELOAD, tmp_pid_file)
|
||||
assert command == "/usr/sbin/haproxy -W -f /etc/haproxy/haproxy.cfg -f %s -p %s -x /var/run/haproxy.sock -sf %s" % (os.path.dirname(__file__) + "/fixtures", tmp_pid_file, 10)
|
||||
finally:
|
||||
os.remove(tmp_pid_file)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue