Commit a783513a authored by nimrod's avatar nimrod
Browse files

- Some more tests.

parent 0512bc0d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
def test_ntp(Service, Ansible):
    if Ansible('setup')['ansible_facts']['ansible_service_mgr'] == 'systemd':
        assert Service('systemd-timesyncd').is_running
        service = Service('systemd-timesyncd')
    elif Ansible('setup')['ansible_facts']['ansible_os_family'] == 'Debian':
        assert Service('openntpd').is_running
        service = Service('openntpd')
    elif Ansible('setup')['ansible_facts']['ansible_os_family'] == 'OpenBSD':
        assert Service('ntpd').is_running
        service = Service('ntpd')
    assert service.is_running
    try:
        assert service.is_enabled
    except NotImplementedError:
        pass