diff --git a/tests/Makefile b/tests/Makefile index 7b1338bd..11869922 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -18,41 +18,41 @@ test-%: vendor test_3_manual_enabling_extensions.php # Test function handler - docker stop test-php-$* 2> /dev/null || true # silence errors + docker rm -f test-php-$* 2> /dev/null || true # silence errors docker run --platform=${DOCKER_PLATFORM} --rm --detach -v=$(PWD):/var/task:ro --name test-php-$* \ -e BREF_RUNTIME=function \ bref/php-$* test_4_function_handler.php docker exec test-php-$* php test_4_function_invocation.php \ || (docker logs test-php-$* && exit 1) - docker stop test-php-$* + docker rm -f test-php-$* # Test FPM handler - docker stop test-php-$* 2> /dev/null || true # silence errors + docker rm -f test-php-$* 2> /dev/null || true # silence errors docker run --platform=${DOCKER_PLATFORM} --rm --detach -v=$(PWD):/var/task:ro --name test-php-$* \ -e BREF_RUNTIME=fpm \ bref/php-$* test_5_fpm_handler.php docker exec test-php-$* php test_5_fpm_invocation.php \ || (docker logs test-php-$* && exit 1) # print logs in case of failure - docker stop test-php-$* + docker rm -f test-php-$* # Test console handler - docker stop test-php-$* 2> /dev/null || true # silence errors + docker rm -f test-php-$* 2> /dev/null || true # silence errors docker run --platform=${DOCKER_PLATFORM} --rm --detach -v=$(PWD):/var/task:ro --name test-php-$* \ -e BREF_RUNTIME=console \ bref/php-$* test_6_console_handler.php docker exec test-php-$* php test_6_console_invocation.php \ || (docker logs test-php-$* && exit 1) # print logs in case of failure - docker stop test-php-$* + docker rm -f test-php-$* # Test that we can override PHP_INI_SCAN_DIR - docker stop test-php-$*-test7 2> /dev/null || true # silence errors + docker rm -f test-php-$*-test7 2> /dev/null || true # silence errors docker run --platform=${DOCKER_PLATFORM} --rm --detach -v=$(PWD):/var/task:ro --name test-php-$*-test7 \ -e BREF_RUNTIME=function \ -e PHP_INI_SCAN_DIR="/etc/php/conf.d/:/var/task/" \ bref/php-$* test_4_function_handler.php docker exec test-php-$*-test7 php test_7_custom_ini_scan_dir.php \ || (docker logs test-php-$*-test7 && exit 1) # print logs in case of failure - docker stop test-php-$*-test7 + docker rm -f test-php-$*-test7 echo "\033[1;32m✓ Tests succeeded\033[0m"