diff --git a/roles/php_website/molecule/default/tests/test_parameters_mandatory.py b/roles/php_website/molecule/default/tests/test_parameters_mandatory.py index 70f69db08e28c2687be25e70cd0d34f342c81bcc..a5860a32a5a28b3cbe0c369be2a715f77fbcfe61 100644 --- a/roles/php_website/molecule/default/tests/test_parameters_mandatory.py +++ b/roles/php_website/molecule/default/tests/test_parameters_mandatory.py @@ -132,19 +132,12 @@ def test_mail_forwarding(host): assert re.search(pattern, mail_log.content_string) is not None -def test_php_fpm_configuration_file(host): +def test_php_fpm_configuration_file(host, php_info): """ Tests if PHP FPM configuration file has been correctly deployed. """ - distribution_release = host.ansible("setup")["ansible_facts"]["ansible_distribution_release"] - - if distribution_release == "buster": - config_file_path = '/etc/php/7.3/fpm/pool.d/parameters-mandatory.conf' - elif distribution_release == "bullseye": - config_file_path = '/etc/php/7.4/fpm/pool.d/parameters-mandatory.conf' - else: - raise Exception("Tried running test on unsupported distribution: %s" % distribution_release) + config_file_path = os.path.join(php_info.fpm_pool_dir, 'parameters-mandatory.conf') with host.sudo():