New upstream version 2.3.2
This commit is contained in:
parent
09f4277f49
commit
21323d25dd
104 changed files with 34386 additions and 7430 deletions
|
@ -126,8 +126,6 @@ if ($pid) {
|
|||
exit;
|
||||
}
|
||||
}
|
||||
# give our webservers some time to startup
|
||||
sleep(1);
|
||||
} else {
|
||||
# Child
|
||||
#print "child\n";
|
||||
|
@ -140,6 +138,9 @@ if ($pid) {
|
|||
exit;
|
||||
}
|
||||
|
||||
# give our webservers some time to startup
|
||||
sleep(3);
|
||||
|
||||
# Run the same server on http and https
|
||||
sub run_server {
|
||||
my $d = shift;
|
||||
|
@ -227,23 +228,25 @@ SKIP: {
|
|||
skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https};
|
||||
run_common_tests( { command => "$command -p $port_https", ssl => 1 } );
|
||||
|
||||
my $expiry = "Thu Nov 28 21:02:11 2030 +0000";
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14" );
|
||||
is( $result->return_code, 0, "$command -p $port_https -S -C 14" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on Fri Feb 16 15:31:44 2029 +0000.", "output ok" );
|
||||
is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on $expiry.", "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 14000" );
|
||||
is( $result->return_code, 1, "$command -p $port_https -S -C 14000" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
# Expired cert tests
|
||||
$result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" );
|
||||
is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" );
|
||||
|
||||
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
|
||||
is( $result->output,
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.',
|
||||
'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 12:00:00 2008 +0000.',
|
||||
"output ok" );
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue