def test_that_consul_client_is_running_on(consul_node):
with settings(
hide('stdout', 'running'),
host_string=consul_node.host_string,
private_key_filename=consul_node.private_key
):
print(" running on %s" % consul_node.host_string)
line = 'consul agent -config-dir /etc/consul.d/client'
cmd = sudo('COLUMNS=1000 ps -edalf')
try:
assert line in cmd.stdout
except Exception as detail:
raise Exception("%s %s" % (cmd.stdout, detail))
cmd = sudo('systemctl is-active consul-client')
try:
assert 'active' in cmd.stdout
except Exception as detail:
raise Exception("%s %s" % (cmd.stdout, detail))
评论列表
文章目录