Files
@ 6bdfd938ef64
Branch filter:
Location: majic-ansible-roles/roles/ldap_server/molecule/default/tests/test_client.py - annotation
6bdfd938ef64
803 B
text/x-python
MAR-242: Document that expiration period is set for uploaded files.
c082a26b62ff c082a26b62ff 65ad7f138939 65ad7f138939 ec4e3e91c4d3 ec4e3e91c4d3 c082a26b62ff ec4e3e91c4d3 d62b3adec462 ec4e3e91c4d3 ec4e3e91c4d3 65ad7f138939 bc7eef6554a9 65ad7f138939 8d67cca58871 8d67cca58871 ec4e3e91c4d3 ec4e3e91c4d3 ec4e3e91c4d3 8d67cca58871 ec4e3e91c4d3 8d67cca58871 ec4e3e91c4d3 8d67cca58871 ec4e3e91c4d3 8d67cca58871 | import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('client')
@pytest.mark.parametrize('server', testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-*')
)
@pytest.mark.parametrize('ip_protocol', [4, 6])
def test_connectivity(host, server, ip_protocol):
with host.sudo():
ping = host.run('nmap -%s -p 389 -oG - %s', str(ip_protocol), server)
assert ping.rc == 0
assert "Ports: 389/open/tcp//ldap/" in ping.stdout
ping = host.run('nmap -%s -p 636 -oG - %s', str(ip_protocol), server)
assert ping.rc == 0
assert "Ports: 636/open/tcp//ldapssl/" in ping.stdout
|