File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,16 @@ def test_exit_when_fpm_is_invalid_path(host, setup_fpm_to_default_fixture):
5959 assert "Trying to connect to PHP-FPM via: localhost:9000/invalid" in cmd .stdout
6060 assert "Unable to reach PHP-FPM status page. Response code: 404" in cmd .stderr
6161
62+ @pytest .mark .php_fpm
63+ def test_exit_when_fpm_has_error_code (host , setup_fpm_to_default_fixture ):
64+ host .run ("mkdir -p /var/www/html/error" )
65+ host .run ("touch /var/www/html/error/index.php" )
66+ host .run ("echo \" <?php http_response_code(500);\" > /var/www/html/error/index.php" )
67+ cmd = host .run ("FCGI_STATUS_PATH=/var/www/html/error/index.php php-fpm-healthcheck -v" )
68+ assert cmd .rc == 8
69+ assert "Trying to connect to PHP-FPM via: localhost:9000/var/www/html/error/index.php" in cmd .stdout
70+ assert "Unable to reach PHP-FPM status page. Response code: 500" in cmd .stderr
71+
6272@pytest .mark .alpine
6373def test_exit_when_fpm_is_not_reachable_apk (host , setup_fpm_to_default_fixture ):
6474 cmd = host .run ("FCGI_CONNECT=localhost:9001 php-fpm-healthcheck -v" )
You can’t perform that action at this time.
0 commit comments