diff --git a/roles/common/molecule/default/tests/test_maintenance_from_allowed_client.py b/roles/common/molecule/default/tests/test_maintenance_from_allowed_client.py index b1f95b21bca54a9b388ec354f1e4f55101c91c78..21fcfab1017555cf95e0c80b0fee8018ee0c7bfe 100644 --- a/roles/common/molecule/default/tests/test_maintenance_from_allowed_client.py +++ b/roles/common/molecule/default/tests/test_maintenance_from_allowed_client.py @@ -23,8 +23,10 @@ def test_ssh_connectivity(host, target_host): with host.sudo(): - ping = host.run('hping3 -S -p 22 -c 1 %s', target_host) - assert ping.rc == 0 + scan = host.run('nmap -p 22 -oG - %s', target_host) + + assert scan.rc == 0 + assert "Ports: 22/open/tcp//ssh" in scan.stdout @pytest.mark.parametrize("target_host", parameters_mandatory_hosts + parameters_optional_hosts) @@ -35,5 +37,7 @@ def test_http_connectivity(host, target_host): with host.sudo(): - ping = host.run('hping3 -S -p 80 -c 1 %s', target_host) - assert ping.rc == 0 + scan = host.run('nmap -p 80 -oG - %s', target_host) + + assert scan.rc == 0 + assert "Ports: 80/open/tcp//http" in scan.stdout