File diff 6bb8ed6d6443 → d752715bb533
roles/common/molecule/default/tests/test_default.py
Show inline comments
 
@@ -129,7 +129,7 @@ def test_root_remote_login_disabled(host):
 
    Tests if SSH server has been configured to prevent remote root logins.
 
    """
 

	
 
    assert 'PermitRootLogin no' in host.file('/etc/ssh/sshd_config').content
 
    assert 'PermitRootLogin no' in host.file('/etc/ssh/sshd_config').content_string
 

	
 

	
 
def test_remote_login_via_password_disabled(host):
 
@@ -138,7 +138,7 @@ def test_remote_login_via_password_disabled(host):
 
    authentication.
 
    """
 

	
 
    assert 'PasswordAuthentication no' in host.file('/etc/ssh/sshd_config').content
 
    assert 'PasswordAuthentication no' in host.file('/etc/ssh/sshd_config').content_string
 

	
 

	
 
def test_ferm_service_configuration(host):
 
@@ -149,9 +149,9 @@ def test_ferm_service_configuration(host):
 
    assert ferm_service_config.user == 'root'
 
    assert ferm_service_config.group == 'root'
 
    assert ferm_service_config.mode == 0o644
 
    assert 'FAST=yes' in ferm_service_config.content
 
    assert 'CACHE=no' in ferm_service_config.content
 
    assert 'ENABLED="yes"' in ferm_service_config.content
 
    assert 'FAST=yes' in ferm_service_config.content_string
 
    assert 'CACHE=no' in ferm_service_config.content_string
 
    assert 'ENABLED="yes"' in ferm_service_config.content_string
 

	
 

	
 
def test_ferm_configuration_directory(host):
 
@@ -180,7 +180,7 @@ def test_ferm_configuration(host):
 
        assert ferm_configuration.user == 'root'
 
        assert ferm_configuration.group == 'root'
 
        assert ferm_configuration.mode == 0o640
 
        assert "@include '/etc/ferm/conf.d/';" in ferm_configuration.content
 
        assert "@include '/etc/ferm/conf.d/';" in ferm_configuration.content_string
 

	
 
        ferm_base = host.file('/etc/ferm/conf.d/00-base.conf')
 
        assert ferm_base.is_file
 
@@ -231,7 +231,7 @@ def test_check_certificate_crontab(host):
 
    assert check_certificate_crontab.user == 'root'
 
    assert check_certificate_crontab.group == 'root'
 
    assert check_certificate_crontab.mode == 0o644
 
    assert "0 0 * * * nobody /usr/local/bin/check_certificate.sh -q expiration" in check_certificate_crontab.content
 
    assert "0 0 * * * nobody /usr/local/bin/check_certificate.sh -q expiration" in check_certificate_crontab.content_string
 

	
 

	
 
@pytest.mark.parametrize('virtualenv_activate_path', [
 
@@ -369,8 +369,8 @@ def test_pipreqcheck_crontab(host, crontab_path, virtualenv_path):
 
    assert crontab.user == 'root'
 
    assert crontab.group == 'root'
 
    assert crontab.mode == 0o644
 
    assert "MAILTO=root" in crontab.content
 
    assert virtualenv_path in crontab.content.split(" ")
 
    assert "MAILTO=root" in crontab.content_string
 
    assert virtualenv_path in crontab.content_string.split(" ")
 

	
 

	
 
@pytest.mark.parametrize('python_path, expected_major_version', [