|
|
@ -1 +1,13 @@ |
|
|
|
# Add your testinfra code here |
|
|
|
|
|
|
|
import pytest |
|
|
|
|
|
|
|
|
|
|
|
def test_consul_service(host): |
|
|
|
assert host.service("consul").is_running |
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.parametrize("port", [8300, 8301, 8302, 8500, 8600]) |
|
|
|
def test_consul_listen(host, port): |
|
|
|
facts = host.ansible.get_variables() |
|
|
|
assert host.socket(f"tcp://{facts['ansible_default_ipv4']['address']['__ansible_unsafe']}:{port}").is_listening |