File tree 1 file changed +10
-0
lines changed
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):
59
59
assert "Trying to connect to PHP-FPM via: localhost:9000/invalid" in cmd .stdout
60
60
assert "Unable to reach PHP-FPM status page. Response code: 404" in cmd .stderr
61
61
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
+
62
72
@pytest .mark .alpine
63
73
def test_exit_when_fpm_is_not_reachable_apk (host , setup_fpm_to_default_fixture ):
64
74
cmd = host .run ("FCGI_CONNECT=localhost:9001 php-fpm-healthcheck -v" )
You can’t perform that action at this time.
0 commit comments