File diff a8ad1fdf6f60 → c92d79571cf9
roles/xmpp_server/molecule/default/tests/test_default.py
Show inline comments
 
@@ -123,6 +123,28 @@ def test_firewall_configuration_file(host):
 
        assert config.group == 'root'
 
        assert config.mode == 0o640
 

	
 

	
 
def test_xmpp_server_dh_parameters_file(host):
 
    """
 
    Tests if the Diffie-Helman parameter file has been generated
 
    correctly.
 
    """
 

	
 
    fqdn = host.run('hostname -f').stdout.strip()
 
    dhparam_file_path = '/etc/ssl/private/%s_xmpp.dh.pem' % fqdn
 

	
 
    with host.sudo():
 
        dhparam_file = host.file(dhparam_file_path)
 
        assert dhparam_file.is_file
 
        assert dhparam_file.user == 'root'
 
        assert dhparam_file.group == 'prosody'
 
        assert dhparam_file.mode == 0o640
 

	
 
        dhparam_info = host.run("openssl dhparam -noout -text -in %s", dhparam_file_path)
 

	
 
        assert "DH Parameters: (2048 bit)" in dhparam_info.stdout
 

	
 

	
 
# @TODO: Tests which were not implemented due to lack of out-of-box tools:
 
#
 
# - Proxy capability.