Code

check_http: check for and print the certificate cn
[nagiosplug.git] / plugins / tests / check_http.t
index 74eff1758acdcd3130362fb23a2ed6f7a1baa9e6..9ae6bbdcb21bfd0909b177dd1da0d312f962965a 100755 (executable)
@@ -182,17 +182,17 @@ 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 will expire on 03/03/2019 21:41.', "output ok" );
+       is( $result->output, 'OK - Certificate \'Ton Voon\' will expire on 03/03/2019 21:41.', "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 expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
+       like( $result->output, '/WARNING - Certificate \'Ton Voon\' expires in \d+ day\(s\) \(03/03/2019 21:41\)./', "output ok" );
 
        # Expired cert tests
        $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 expired on 03/05/2009 00:13.',
+               'CRITICAL - Certificate \'Ton Voon\' expired on 03/05/2009 00:13.',
                "output ok" );
 
 }