diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-20 22:33:29 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-20 22:33:29 (GMT) |
commit | 68fbbb6d638c827afbc567b03e5488a476a9b1b6 (patch) | |
tree | 2c1a54fa08eaa28551a946df75e5ba192479a701 /plugins/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')
-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 21ac0f7..5b67886 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t | |||
@@ -9,7 +9,7 @@ use strict; | |||
9 | use Test::More; | 9 | use Test::More; |
10 | use NPTest; | 10 | use NPTest; |
11 | 11 | ||
12 | plan tests => 22; | 12 | plan tests => 26; |
13 | 13 | ||
14 | my $successOutput = '/OK.*HTTP.*second/'; | 14 | my $successOutput = '/OK.*HTTP.*second/'; |
15 | 15 | ||
@@ -68,6 +68,14 @@ cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com") | |||
68 | like ( $res->output, '/Certificate will expire on/', "Output OK" ); | 68 | like ( $res->output, '/Certificate will expire on/', "Output OK" ); |
69 | my $saved_cert_output = $res->output; | 69 | my $saved_cert_output = $res->output; |
70 | 70 | ||
71 | $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); | ||
72 | is( $res->return_code, 0, "Old syntax for cert checking okay" ); | ||
73 | is( $res->output, $saved_cert_output, "Same output as new syntax" ); | ||
74 | |||
75 | $res = NPTest->testCmd( "./check_http -H www.verisign.com -C 1" ); | ||
76 | is( $res->return_code, 0, "Updated syntax for cert checking okay" ); | ||
77 | is( $res->output, $saved_cert_output, "Same output as new syntax" ); | ||
78 | |||
71 | $res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" ); | 79 | $res = NPTest->testCmd( "./check_http -C 1 www.verisign.com" ); |
72 | cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added"); | 80 | cmp_ok( $res->output, 'eq', $saved_cert_output, "--ssl option automatically added"); |
73 | 81 | ||
@@ -96,6 +104,6 @@ like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); | |||
96 | $res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs' --invert-regex" ); | 104 | $res = NPTest->testCmd( "./check_http -H altinity.com -r 'nAGiOs' --invert-regex" ); |
97 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); | 105 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); |
98 | 106 | ||
99 | $res = NPTest->testCmd( "./check_http -H www.worldfirefoxday.com -f follow" ); | 107 | $res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox -f follow" ); |
100 | is( $res->return_code, 0, "Redirection based on location is okay"); | 108 | is( $res->return_code, 0, "Redirection based on location is okay"); |
101 | 109 | ||