Select Git revision
-
nimrod authored
- A bunch of hooks, some copied from previous repos, some improvements on previous attempts, some new. - README, CI, etc. - A Python utilities module for helping with Python hooks.
nimrod authored- A bunch of hooks, some copied from previous repos, some improvements on previous attempts, some new. - README, CI, etc. - A Python utilities module for helping with Python hooks.
test_dhcp.py 515 B
from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_dhcp_service(Service, Socket, SystemInfo):
if SystemInfo.type == 'openbsd':
service = Service('dhcpd')
elif SystemInfo.type == 'linux':
service = Service('isc-dhcp-server')
assert service.is_running
try:
assert service.is_enabled
except NotImplementedError:
pass
assert Socket('udp://0.0.0.0:67').is_listening