Skip test for PHP 5.2

This commit is contained in:
cytopia
2018-08-03 23:37:18 +02:00
parent cf21dc3ea7
commit 04a24b69b6

View File

@@ -18,6 +18,11 @@ FLAVOUR="${3}"
############################################################ ############################################################
# Tests # Tests
############################################################ ############################################################
if [ "${VERSION}" != "5.2" ]; then
echo "Skipping tests for PHP 5.2"
exit 0
fi
### ###
### Test Nginx with PHP-FPM ### Test Nginx with PHP-FPM
@@ -34,24 +39,7 @@ PHP_CNF_CONT="/etc/php-fpm-custom.d"
CONTAINER="nginx:stable" CONTAINER="nginx:stable"
if [ "${VERSION}" = "5.2" ]; then printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf"
{
echo '<?xml version="1.0" ?>';
echo '<configuration>';
echo ' <workers>';
echo ' <section name="pool">';
echo ' <value name="php_defines">';
echo ' <value name="php_admin_value[memory_limit]">17M</value>';
echo ' <value name="php_value[memory_limit]">17M</value>';
echo ' <value name="memory_limit">17M</value>';
echo ' </value>';
echo ' </section>';
echo ' </workers>';
echo '</configuration>';
} > "${PHP_CNF_HOST}/post.conf"
else
printf "[www]\nphp_admin_value[memory_limit] = 17M\n" > "${PHP_CNF_HOST}/post.conf"
fi
echo "<?php phpinfo();" > "${DOC_ROOT_HOST}/index.php" echo "<?php phpinfo();" > "${DOC_ROOT_HOST}/index.php"
# Fix mount permissions # Fix mount permissions
@@ -139,9 +127,7 @@ fi
# Check modified php-fpm.conf # Check modified php-fpm.conf
# Does not work with PHP 5.2 if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then
if [ "${VERSION}" != "5.2" ]; then
if ! run "curl -q -4 http://127.0.0.1:${WWW_PORT}/index.php 2>/dev/null | grep memory_limit | grep '17M'"; then
# Info # Info
run "netstat -tuln" run "netstat -tuln"
run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true run "curl -4 http://127.0.0.1:${WWW_PORT}/index.php | grep memory_limit" || true
@@ -170,7 +156,6 @@ if [ "${VERSION}" != "5.2" ]; then
rm -rf "${PHP_CNF_HOST}" rm -rf "${PHP_CNF_HOST}"
echo "Failed" echo "Failed"
exit 1 exit 1
fi
fi fi