@@ -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():