From d41ae44e668ddef0654d52c86dcf7904c8970970 Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Nov 20 2018 22:27:40 +0000 Subject: Merge pull request #29 from psgreco/php_mysql Use php-mysqlnd instead of the deprecated php-mysql in tests --- diff --git a/tests/p_httpd/0-install_httpd.sh b/tests/p_httpd/0-install_httpd.sh index c9620f2..3e33481 100755 --- a/tests/p_httpd/0-install_httpd.sh +++ b/tests/p_httpd/0-install_httpd.sh @@ -2,13 +2,19 @@ # Author: Athmane Madjoudj # Christoph Galuschka +php_mysql="php-mysql" +if [ $centos_ver -ge 7 ] +then + php_mysql="php-mysqlnd" +fi + # Install tests deps -t_Log "Running $0 - httpd: installing curl, http, php and php-mysql" +t_Log "Running $0 - httpd: installing curl, http, php and $php_mysql" #t_InstallPackage curl # HTTPD / PHP -t_InstallPackage curl httpd mod_ssl php php-mysql +t_InstallPackage curl httpd mod_ssl php $php_mysql t_ServiceControl httpd stop sleep 3 killall httpd diff --git a/tests/p_php/20-php-mysql-test.sh b/tests/p_php/20-php-mysql-test.sh index 23f4497..db9544d 100755 --- a/tests/p_php/20-php-mysql-test.sh +++ b/tests/p_php/20-php-mysql-test.sh @@ -5,22 +5,20 @@ t_Log "Running $0 - php-cli basic interaction with mysql test." -# Install php-mysql-module -t_InstallPackage php-mysql - +# Install php-mysql/php-mysqld module depending on version # we need a working and running mysql server #starting with 5.10 we need to reflect mysql55 if [ $centos_ver = 5 ] then - t_InstallPackage mysql-server mysql55-mysql-server nc + t_InstallPackage mysql-server mysql55-mysql-server nc php-mysql t_ServiceControl mysql55-mysqld stop t_ServiceControl mysqld start >/dev/null 2>&1 elif [ $centos_ver = 6 ] then - t_InstallPackage mysql-server nc + t_InstallPackage mysql-server nc php-mysql t_ServiceControl mysqld start >/dev/null 2>&1 else - t_InstallPackage mariadb-server nc + t_InstallPackage mariadb-server nc php-mysqlnd t_ServiceControl mariadb start >/dev/null 2>&1 fi diff --git a/tests/r_lamp/40_basic_lamp.sh b/tests/r_lamp/40_basic_lamp.sh index 4253a7b..ca176bd 100755 --- a/tests/r_lamp/40_basic_lamp.sh +++ b/tests/r_lamp/40_basic_lamp.sh @@ -12,8 +12,11 @@ if [ $centos_ver = 5 ] then t_InstallPackage mysql55-mysql-server httpd mysql55-mysql php php-mysql wget t_ServiceControl mysql55-mysqld stop -else +elif [ $centos_ver = 6 ] +then t_InstallPackage httpd mysql mysql-server php php-mysql wget +else + t_InstallPackage httpd mysql mysql-server php php-mysqlnd wget fi t_ServiceControl mysqld restart t_ServiceControl httpd restart