diff --git a/roles/common/molecule/default/tests/test_parameters_mandatory.py b/roles/common/molecule/default/tests/test_parameters_mandatory.py index b3af54e64edfc0457db21ea78a1dfb7980aacbc6..925fcef85a450e87147351c271d4e8172523e6bd 100644 --- a/roles/common/molecule/default/tests/test_parameters_mandatory.py +++ b/roles/common/molecule/default/tests/test_parameters_mandatory.py @@ -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