New upstream version 2.2
This commit is contained in:
parent
ea115afa68
commit
c845af032a
101 changed files with 4649 additions and 22969 deletions
|
@ -17,6 +17,8 @@ use Test::More;
|
|||
use NPTest;
|
||||
use FindBin qw($Bin);
|
||||
|
||||
$ENV{'LC_TIME'} = "C";
|
||||
|
||||
my $common_tests = 70;
|
||||
my $ssl_only_tests = 8;
|
||||
# Check that all dependent modules are available
|
||||
|
@ -186,21 +188,21 @@ SKIP: {
|
|||
|
||||
$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 \'Ton Voon\' will expire on Sun Mar 3 21:41:00 2019.', "output ok" );
|
||||
is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on Sun Mar 3 21:41:28 2019 +0000.', "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 \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:00 2019\)./', "output ok" );
|
||||
like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019 \+0000\)./', "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 \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:00 2019\)./', "output ok" );
|
||||
like( $result->output, '/CRITICAL - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(Sun Mar 3 21:41:28 2019 \+0000\)./', "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 \'Ton Voon\' expired on Thu Mar 5 00:13:00 2009.',
|
||||
'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009 +0000.',
|
||||
"output ok" );
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue