Changeset - 278ffa0d6f71
[Not reviewed]
0 2 0
Branko Majic (branko) - 2 months ago 2025-01-22 14:39:46
branko@majic.rs
MAR-233: Switch from hping3 to nmap for connectivity tests in the web_server role.
2 files changed with 3 insertions and 7 deletions:
0 comments (0 inline, 0 general) First comment
roles/web_server/molecule/default/prepare.yml
Show inline comments
 
@@ -85,11 +85,6 @@
 
  become: true
 
  tasks:
 

	
 
    - name: Install tool for testing TCP connectivity
 
      ansible.builtin.apt:
 
        name: hping3
 
        state: present
 

	
 
    - name: Install console-based web browser for interactive testing
 
      ansible.builtin.apt:
 
        name: lynx
roles/web_server/molecule/default/tests/test_client.py
Show inline comments
 
@@ -20,5 +20,6 @@ def test_connectivity(host, server, port):
 

	
 
    with host.sudo():
 

	
 
        ping = host.run('hping3 -S -p %s -c 1 %s', str(port), server)
 
        assert ping.rc == 0
 
        scan = host.run('nmap -4 -p %s -oG - %s', str(port), server)
 
        assert scan.rc == 0
 
        assert "Ports: %d/open/tcp//" % port in scan.stdout
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now