diff --git a/tests/test_syslog_forward.py b/tests/test_syslog_forward.py index 706db0636592776332960b8687b656724a4c4c98..38b391dc0acfd34e67e069caeb41756ef3937e7c 100644 --- a/tests/test_syslog_forward.py +++ b/tests/test_syslog_forward.py @@ -3,9 +3,18 @@ from testinfra.utils.ansible_runner import AnsibleRunner testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all') -def test_syslog_forward(Service, SystemInfo): +def test_syslog_forward_service(Service, SystemInfo): if SystemInfo.type == 'openbsd': assert Service('syslogd').is_running elif SystemInfo.type == 'linux' and SystemInfo.distribution in ['debian', 'ubuntu']: assert Service('rsyslog').is_running + + +def test_syslog_forwarding_syntax(SystemInfo, Command, Sudo): + if SystemInfo.type == 'linux' and SystemInfo.distribution in ['debian', + 'ubuntu']: + with Sudo(): + command = Command('rsyslogd -N1') + assert command.rc == 0 + assert 'End of config validation run' in command.stderr