File diff 3e20da821a68 → 5f9f8aef3473
roles/common/molecule/default/tests/test_parameters_mandatory.py
Show inline comments
 
@@ -5,8 +5,6 @@ import paramiko
 

	
 
import testinfra.utils.ansible_runner
 

	
 
import pytest
 

	
 

	
 
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
 
    os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-mandatory')
 
@@ -135,27 +133,21 @@ def test_ntp_listening_interfaces(host):
 
    assert not host.socket('udp://:::123').is_listening
 

	
 

	
 
@pytest.mark.parametrize("requirements_path, expected_requirements", [
 
    ('/etc/pip_check_requirements_upgrades/pipreqcheck/requirements.in', [
 
        "pip",
 
        "pip-tools",
 
        "setuptools",
 
        "wheel"
 
    ]),
 
    ('/etc/pip_check_requirements_upgrades-py3/pipreqcheck/requirements.in', [
 
        "pip",
 
        "pip-tools",
 
        "setuptools",
 
        "wheel"
 
    ])
 
])
 
def test_pipreqcheck_input_content(host, requirements_path, expected_requirements):
 
def test_pipreqcheck_input_content(host):
 
    """
 
    Tests content of requirements input file used for virtual
 
    environment utilised by script that performs pip requirements
 
    upgrade checks.
 
    """
 

	
 
    requirements_path = '/etc/pip_check_requirements_upgrades/pipreqcheck/requirements.in'
 
    expected_requirements = [
 
        "pip",
 
        "pip-tools",
 
        "setuptools",
 
        "wheel"
 
    ]
 

	
 
    with host.sudo():
 
        deployed_requirements = host.file(requirements_path).content_string