diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-20 22:33:29 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-20 22:33:29 +0000 |
commit | 68fbbb6d638c827afbc567b03e5488a476a9b1b6 (patch) | |
tree | 2c1a54fa08eaa28551a946df75e5ba192479a701 /plugins/t/check_http.t | |
parent | 958162b45fb77dcacb302e6c65cc5fb45df47692 (diff) | |
download | monitoring-plugins-68fbbb6d638c827afbc567b03e5488a476a9b1b6.tar.gz |
Removed unused timestamp variable (Matthias Eble)
Fixed redirection test. Added extra tests for funny syntax when checking
certificates, updated help for more common syntax
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1555 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r-- | plugins/t/check_http.t | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 21ac0f7a..5b678861 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t @@ -9,7 +9,7 @@ use strict; use Test::More; use NPTest; -plan tests => 22; +plan tests => 26; my $successOutput = '/OK.*HTTP.*second/'; @@ -68,6 +68,14 @@ cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com") like ( $res->output, '/Certificate will expire on/', "Output OK" ); my $saved_cert_output = $res->output; +$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); +is( $res->return_code, 0, "Old syntax for cert checking okay" ); +is( $res->output, $saved_cert_output, "Same output as new syntax" ); + +$res = NPTest->testCmd( "./check_http -H www.verisign.com -C 1" ); +is( $res->return_code, 0, "Updated syntax for cert checking okay" ); +is( $res->output, $saved_cert_output, "Same output as new syntax" ); + $res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" ); cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added"); @@ -96,6 +104,6 @@ like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); $res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs' --invert-regex" ); cmp_ok( $res->return_code, "==", 0, "And also when not found"); -$res = NPTest->testCmd( "./check_http -H www.worldfirefoxday.com -f follow" ); +$res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox -f follow" ); is( $res->return_code, 0, "Redirection based on location is okay"); |