Files @ 23200e1ae9a8
Branch filter:

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

branko
MAR-114: Updated task syntax for mail roles:

- Updated mail_server and mail_forwarder roles.
- Added and removed quoting where it makes sense.
- Switched to using expanded syntax (instead of one-liners).
- Updated ordering of arguments in task definitions.
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