blob: 245fc425ca319b20027667724a455a7fabeaef5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
--TEST--
FPM: Status basic test
--SKIPIF--
<?php include "skipif.inc"; ?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
[unconfined]
listen = {{ADDR}}
pm = static
pm.max_children = 1
pm.status_path = /status
EOT;
$expectedStatusData = [
'pool' => 'unconfined',
'process manager' => 'static',
'listen queue' => 0,
'max listen queue' => 0,
'idle processes' => 0,
'active processes' => 1,
'total processes' => 1,
'max active processes' => 1,
'max children reached' => 0,
'slow requests' => 0,
];
$tester = new FPM\Tester($cfg);
$tester->start();
$tester->expectLogStartNotices();
$tester->request()->expectEmptyBody();
$tester->status($expectedStatusData);
$tester->terminate();
$tester->expectLogTerminatingNotices();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>
|