Changeset - e84ee30194a1
[Not reviewed]
0 2 0
Branko Majic (branko) - 2 months ago 2025-01-22 02:20:27
branko@majic.rs
MAR-233: Replace hping3 with nmap in connectivity tests for mail_server role.
2 files changed with 3 insertions and 7 deletions:
0 comments (0 inline, 0 general) First comment
roles/mail_server/molecule/default/prepare.yml
Show inline comments
 
@@ -256,11 +256,6 @@
 
        name: sieve-connect
 
        state: present
 

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

	
 
    - name: Deploy IMAP CLI configuration
 
      ansible.builtin.copy:
 
        src: "tests/data/{{ item }}"
roles/mail_server/molecule/default/tests/test_client2.py
Show inline comments
 
@@ -294,8 +294,9 @@ 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
 

	
 

	
 
def test_port_forwarding(host):
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now