Files @ b6f7eccea487
Branch filter:

Location: majic-ansible-roles/roles/ldap_server/tests/test_client.py

branko
MAR-117: Renamed ldap_entry and ldap_permissions modules:

- Renamed ldap_entry module to m_ldap_entry.
- Renamed ldap_permissions module to m_ldap_permissions.
- Renames done to avoid collisions with official modules (at least for
ldap_entry).
import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    '.molecule/ansible_inventory').get_hosts('client')


def test_connectivity(Command, Sudo):

    with Sudo():

        ping = Command('hping3 -S -p 389 -c 1 10.31.127.10')
        assert ping.rc == 0

        ping = Command('hping3 -S -p 636 -c 1 10.31.127.10')
        assert ping.rc == 0

        ping = Command('hping3 -S -p 389 -c 1 10.31.127.11')
        assert ping.rc == 0

        ping = Command('hping3 -S -p 636 -c 1 10.31.127.11')
        assert ping.rc == 0