File diff 23a5f9ba293c → 315128d98063
roles/web_server/molecule/default/tests/test_optional.py
Show inline comments
 
@@ -7,31 +7,6 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
 
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-optional')
 

	
 

	
 
def test_certificate_validity_check_configuration(host):
 
    """
 
    Tests if certificate validity check configuration file has been deployed
 
    correctly.
 
    """
 

	
 
    hostname = host.run('hostname').stdout.strip()
 

	
 
    config = host.file('/etc/check_certificate/%s_https.conf' % hostname)
 
    assert config.is_file
 
    assert config.user == 'root'
 
    assert config.group == 'root'
 
    assert config.mode == 0o644
 
    assert config.content_string == "/etc/ssl/certs/%s_https.pem" % hostname
 

	
 

	
 
def test_tls_enabled(host):
 
    """
 
    Tests if TLS has been enabled.
 
    """
 

	
 
    tls = host.run('wget -q -O - https://parameters-optional/')
 
    assert tls.rc == 0
 

	
 

	
 
def test_tls_version(host):
 
    """
 
    Tests if only the configured TLS protocol versions are allowed by