diff options
author | Sven Nierlein <sven@nierlein.de> | 2017-03-10 22:23:40 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2017-03-12 22:55:52 +0100 |
commit | 0cff5f2d93b1359ab10949aa119527a1e4e6eb35 (patch) | |
tree | 82e804ad6e7b64ab03365ab4433d829bf911b21f /plugins/t/check_tcp.t | |
parent | d721efc10b35071b85ca98a9338e3981ce36a9ab (diff) | |
download | monitoring-plugins-0cff5f2d93b1359ab10949aa119527a1e4e6eb35.tar.gz |
remove hardcoded verisign.com tests
and make it configurable
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'plugins/t/check_tcp.t')
-rw-r--r-- | plugins/t/check_tcp.t | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index f996685d..121b0cb3 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -18,6 +18,9 @@ BEGIN { my $host_tcp_http = getTestParameter( "host_tcp_http", "NP_HOST_TCP_HTTP", "localhost", "A host providing the HTTP Service (a web server)" ); +my $host_tls_http = getTestParameter( "host_tls_http", "NP_HOST_TLS_HTTP", "localhost", + "A host providing the HTTPS Service (a tls web server)" ); + my $host_nonresponsive = getTestParameter( "host_nonresponsive", "NP_HOST_NONRESPONSIVE", "10.0.0.1", "The hostname of system not responsive to network requests" ); @@ -42,10 +45,10 @@ $t += checkCmd( "./check_tcp $host_tcp_http -p 81 -wt 0 -ct 0 -to 1", 2 $t += checkCmd( "./check_tcp $host_nonresponsive -p 80 -wt 0 -ct 0 -to 1", 2 ); $t += checkCmd( "./check_tcp $hostname_invalid -p 80 -wt 0 -ct 0 -to 1", 2 ); if($internet_access ne "no") { - $t += checkCmd( "./check_tcp -S -D 1 -H www.verisign.com -p 443", 0 ); - $t += checkCmd( "./check_tcp -S -D 9000,1 -H www.verisign.com -p 443", 1 ); - $t += checkCmd( "./check_tcp -S -D 9000 -H www.verisign.com -p 443", 1 ); - $t += checkCmd( "./check_tcp -S -D 9000,8999 -H www.verisign.com -p 443", 2 ); + $t += checkCmd( "./check_tcp -S -D 1 -H $host_tls_http -p 443", 0 ); + $t += checkCmd( "./check_tcp -S -D 9000,1 -H $host_tls_http -p 443", 1 ); + $t += checkCmd( "./check_tcp -S -D 9000 -H $host_tls_http -p 443", 1 ); + $t += checkCmd( "./check_tcp -S -D 9000,8999 -H $host_tls_http -p 443", 2 ); } # Need the \r\n to make it more standards compliant with web servers. Need the various quotes |