1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/sapi/fpm/tests/proc-user-ignored.phpt
Matteo Beccati 87375fa2be Skip fpm tests not designed to be run as root
When running as root with TEST_FPM_RUN_AS_ROOT=1
2020-04-02 16:16:42 +02:00

48 lines
795 B
PHP

--TEST--
FPM: Process user setting ignored when FPM is not running as root
--SKIPIF--
<?php
include "skipif.inc";
FPM\Tester::skipIfRoot();
?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR}}
user = foo
ping.path = /ping
ping.response = pong
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
EOT;
$tester = new FPM\Tester($cfg);
$tester->start();
$tester->expectLogNotice(
"'user' directive is ignored when FPM is not running as root",
'unconfined'
);
$tester->expectLogStartNotices();
$tester->terminate();
$tester->expectLogTerminatingNotices();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>