Files
@ 44d578f5e1f3
Branch filter:
Location: majic-ansible-roles/roles/ldap_client/tests/test_default.py - annotation
44d578f5e1f3
615 B
text/x-python
MAR-28: Minor fixes for mail_server tests:
- Take into account different extension for ClamAV database (cvd or cld) that
could happen in cases where the test VM has been running for a long time.
- Before checking Dovecot directory permissions, make sure to send out at least
two mails so the directory structure will get created.
- Fixed incorrect directory path for testing Dovecot directory permissions.
- Take into account different extension for ClamAV database (cvd or cld) that
could happen in cases where the test VM has been running for a long time.
- Before checking Dovecot directory permissions, make sure to send out at least
two mails so the directory structure will get created.
- Fixed incorrect directory path for testing Dovecot directory permissions.
0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 0c2178fd95a5 | import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
'.molecule/ansible_inventory').get_hosts('all')
def test_installed_packages(Package):
"""
Tests if correct packages are installed.
"""
assert Package('ldap-utils').is_installed
def test_ldap_configuration_file(File):
"""
Tests if LDAP configuration files has been deployed with correct
permissions.
"""
config = File('/etc/ldap/ldap.conf')
assert config.is_file
assert config.user == 'root'
assert config.group == 'root'
assert config.mode == 0o644
|