Changeset - 72c8481f0498
[Not reviewed]
0 3 0
Branko Majic (branko) - 2 months ago 2025-01-22 15:42:12
branko@majic.rs
MAR-233: Add IPv6 connectivity tests for the xmpp_server role.
3 files changed with 21 insertions and 2 deletions:
0 comments (0 inline, 0 general) First comment
roles/xmpp_server/molecule/default/molecule.yml
Show inline comments
 
@@ -41,6 +41,11 @@ platforms:
 
        ip: 192.168.56.21
 
        network_name: private_network
 
        type: static
 
      - auto_config: true
 
        ip: fd00::192:168:56:21
 
        network_name: private_network
 
        netmask: 116
 
        type: static
 

	
 
  - name: parameters-mandatory-bookworm
 
    groups:
 
@@ -54,6 +59,11 @@ platforms:
 
        ip: 192.168.56.31
 
        network_name: private_network
 
        type: static
 
      - auto_config: true
 
        ip: fd00::192:168:56:31
 
        network_name: private_network
 
        netmask: 116
 
        type: static
 

	
 
  - name: parameters-optional-bookworm
 
    groups:
 
@@ -67,6 +77,11 @@ platforms:
 
        ip: 192.168.56.32
 
        network_name: private_network
 
        type: static
 
      - auto_config: true
 
        ip: fd00::192:168:56:32
 
        network_name: private_network
 
        netmask: 116
 
        type: static
 

	
 

	
 
provisioner:
roles/xmpp_server/molecule/default/prepare.yml
Show inline comments
 
@@ -93,6 +93,9 @@
 
        192.168.56.21: "client-bookworm"
 
        192.168.56.31: "parameters-mandatory domain1 proxy.domain1 conference.domain1"
 
        192.168.56.32: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3"
 
        fd00::192:168:56:21: "client-bookworm"
 
        fd00::192:168:56:31: "parameters-mandatory domain1 proxy.domain1 conference.domain1"
 
        fd00::192:168:56:32: "parameters-optional domain2 proxy.domain2 conference.domain2 domain3 proxy.domain3 conference.domain3"
 

	
 
- name: Prepare, helpers
 
  hosts: clients
roles/xmpp_server/molecule/default/tests/test_client.py
Show inline comments
 
@@ -11,14 +11,15 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
 

	
 
@pytest.mark.parametrize('server', ['parameters-mandatory', 'parameters-optional'])
 
@pytest.mark.parametrize('port', [5222, 5223, 5000, 5269])
 
def test_connectivity(host, server, port):
 
@pytest.mark.parametrize('ip_protocol', [4, 6])
 
def test_connectivity(host, server, port, ip_protocol):
 
    """
 
    Tests connectivity to the XMPP server (ports that should be reachable).
 
    """
 

	
 
    with host.sudo():
 

	
 
        scan = host.run('nmap -p %s -oG - %s', str(port), server)
 
        scan = host.run('nmap -%s -p %s -oG - %s', str(ip_protocol), 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