Files @ 5ea45eee5187
Branch filter:

Location: majic-ansible-roles/roles/ldap_client/tests/test_default.py - annotation

branko
MAR-124: Updated mail_forwarder test_tls_enforced_towards_relay_mail_server to be a bit robust against race condition.
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