Skip to content

Commit 4ef6280

Browse files
committed
Fix conflicting pattern wrapping in FPM openmetrics test
1 parent 390d4e9 commit 4ef6280

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/fpm/tests/status.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class Status
206206
*/
207207
protected function checkStatusOpenmetrics(string $body, array $fields)
208208
{
209-
$pattern = "|# HELP phpfpm_up Could pool " . $fields['pool'] . " using a " . $fields['process manager'] . " PM on PHP-FPM be reached\?\n" .
209+
$pattern = "(# HELP phpfpm_up Could pool " . $fields['pool'] . " using a " . $fields['process manager'] . " PM on PHP-FPM be reached\?\n" .
210210
"# TYPE phpfpm_up gauge\n" .
211211
"phpfpm_up 1\n" .
212212
"# HELP phpfpm_start_since The number of seconds since FPM has started\.\n" .
@@ -241,7 +241,7 @@ class Status
241241
"phpfpm_max_children_reached " . $fields['max children reached'] . "\n" .
242242
"# HELP phpfpm_slow_requests The number of requests that exceeded your 'request_slowlog_timeout' value\.\n" .
243243
"# TYPE phpfpm_slow_requests counter\n" .
244-
"phpfpm_slow_requests " . $fields['slow requests'] . "|";
244+
"phpfpm_slow_requests " . $fields['slow requests'] . ")";
245245

246246
if (!preg_match($pattern, $body)) {
247247
echo "ERROR: Expected body does not match pattern\n";

0 commit comments

Comments
 (0)