Files @ 606af1737c84
Branch filter:

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

branko
MAR-129: Added information about test tools to development documentation:

- Document use of mcabber/mutt configuration files for trying out the
XMPP/mail server.
import os

import testinfra.utils.ansible_runner


testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts(['client'])


def test_connectivity(host):

    with host.sudo():

        ping = host.run('hping3 -S -p 389 -c 1 10.31.127.20')
        assert ping.rc == 0

        ping = host.run('hping3 -S -p 636 -c 1 10.31.127.20')
        assert ping.rc == 0

        ping = host.run('hping3 -S -p 389 -c 1 10.31.127.21')
        assert ping.rc == 0

        ping = host.run('hping3 -S -p 636 -c 1 10.31.127.21')
        assert ping.rc == 0