Files @ 0c2178fd95a5
Branch filter:

Location: majic-ansible-roles/roles/ldap_client/tests/test_mandatory.py

branko
MAR-25: Implemented tests for ldap_client role:

- Added Molecule configuration.
- Added test playbook.
- Fixed issue with mode not including leading zero.
- Implemented a couple of simple tests.
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    '.molecule/ansible_inventory').get_hosts('parameters-mandatory')


def test_ldap_configuration_file_content(File):
    """
    Tests if LDAP configuration file has correct content
    """

    config = File('/etc/ldap/ldap.conf')

    assert config.content == ""