diff --git a/roles/ldap_server/molecule/default/tests/test_client.py b/roles/ldap_server/molecule/default/tests/test_client.py new file mode 100644 index 0000000000000000000000000000000000000000..6216013577789e1275c828e86e3faa2844c5826c --- /dev/null +++ b/roles/ldap_server/molecule/default/tests/test_client.py @@ -0,0 +1,21 @@ +import testinfra.utils.ansible_runner + +testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( + '.molecule/ansible_inventory.yml').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