Files @ b1b2928c582b
Branch filter:

Location: majic-ansible-roles/roles/mail_forwarder/tests/test_connectivity_from_client.py - annotation

branko
Noticket: Fixed two tests related to application user profile directory in php_website role, and renamed two tests to make more sense.
import testinfra.utils.ansible_runner


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


def test_connectivity_from_client(Command, Sudo):
    """
    Tests connectivity towards mail forwarder servers from client
    (non-relay). Connectivity should fail for both.
    """

    with Sudo():

        ping = Command('hping3 -S -p 25 -c 1 parameters-mandatory')
        assert ping.rc != 0

        ping = Command('hping3 -S -p 25 -c 1 parameters-optional')
        assert ping.rc != 0