diff --git a/tests/LinuxTest.py b/tests/LinuxTest.py index 504a3c8c0..c95d0fc35 100644 --- a/tests/LinuxTest.py +++ b/tests/LinuxTest.py @@ -59,14 +59,16 @@ class LinuxTest(Test) : proc = LinuxTest.docker_exec(distro, "chown -R nginx:nginx " + dst + "/*") if proc.returncode != 0 : raise(Exception("docker exec failed for directory " + src + " (linux stack)")) - # ubuntu : /etc/php/8.1/fpm/pool.d/www.conf / www-data - # debian : /etc/php/7.4/fpm/pool.d/www.conf / www-data - # fedora : /etc/php-fpm.d/www.conf / apache - # centos : /etc/php-fpm.d/www.conf / apache - if self.__distro in ["ubuntu", "debian"] : + if distro in ["ubuntu", "debian"] : LinuxTest.docker_exec(distro, "DEBIAN_FRONTEND=noninteractive apt-get install -y php-fpm") - elif self.__distro in ["centos", "fedora"] : + if distro == "ubuntu" : + LinuxTest.docker_cp(distro, "./tests/www-deb.conf", "/etc/php/8.1/fpm/pool.d/www.conf") + elif distro == "debian" : + LinuxTest.docker_cp(distro, "./tests/www-deb.conf", "/etc/php/7.4/fpm/pool.d/www.conf") + elif distro in ["centos", "fedora"] : LinuxTest.docker_exec(distro, "dnf install -y php-fpm") + LinuxTest.docker_cp(distro, "./tests/www-rpm.conf", "/etc/php-fpm.d/www.conf") + LinuxTest.docker_exec(distro, "systemctl stop php-fpm ; systemctl start php-fpm") sleep(60) except : log("LINUX", "❌", "exception while running LinuxTest.init()\n" + format_exc()) diff --git a/tests/www.conf b/tests/www-deb.conf similarity index 100% rename from tests/www.conf rename to tests/www-deb.conf diff --git a/tests/www-rpm.conf b/tests/www-rpm.conf new file mode 100644 index 000000000..dda761b27 --- /dev/null +++ b/tests/www-rpm.conf @@ -0,0 +1,7 @@ +[www] +user = apache +group = apache +listen = /run/php/php-fpm.sock +listen.ower = apache +listen.group = nginx +listen.mode = 0660