tests - install php-fpm

This commit is contained in:
bunkerity 2022-08-11 13:54:18 +02:00
parent 790fa37aeb
commit d8071e4c43
No known key found for this signature in database
GPG Key ID: 3D80806F12602A7C
3 changed files with 15 additions and 6 deletions

View File

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

7
tests/www-rpm.conf Normal file
View File

@ -0,0 +1,7 @@
[www]
user = apache
group = apache
listen = /run/php/php-fpm.sock
listen.ower = apache
listen.group = nginx
listen.mode = 0660