File: 02_interface.t

package info (click to toggle)
libfcgi-procmanager-maxrequests-perl 0.2-1.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 1,039; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use Test::More tests => 4;

use FCGI::ProcManager::MaxRequests;

my $m = FCGI::ProcManager::MaxRequests->new();
is($m->max_requests, 0, 'max_requests default is 0');

$m->max_requests(5);
is($m->max_requests, 5, 'max_requests can be set through accessor');

$m = FCGI::ProcManager::MaxRequests->new({max_requests => 10});
is($m->max_requests, 10, 'max_requests set in constructor');

$ENV{PM_MAX_REQUESTS} = 2;
$m = FCGI::ProcManager::MaxRequests->new();
is($m->max_requests, 2, 'max_requests default set to PM_MAX_REQUESTS env if it exists');