Skip to content
Snippets Groups Projects
Commit 28467e68 authored by nimrod's avatar nimrod
Browse files

- Added config validity test.

parent 32ba1fc7
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment