diff options
author | Monitoring Plugins Development Team <devel@monitoring-plugins.org> | 2014-01-18 08:40:24 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2014-01-19 19:18:47 (GMT) |
commit | 63734f52ab1b4b2c17545b26fc41016d6bbd80bd (patch) | |
tree | dcd7aa3fd9a2a6a69a47d3a7e6a18d034426087a /plugins/t/check_http.t | |
parent | 9db763963f3993f923619a2147e4313b09f12134 (diff) | |
download | monitoring-plugins-63734f52ab1b4b2c17545b26fc41016d6bbd80bd.tar.gz |
Project rename initial commit.
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r-- | plugins/t/check_http.t | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index 2908673..5bd27d2 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t | |||
@@ -31,8 +31,8 @@ my $internet_access = getTestParameter( "NP_INTERNET_ACCESS", | |||
31 | "yes"); | 31 | "yes"); |
32 | 32 | ||
33 | my $host_tcp_http2 = getTestParameter( "NP_HOST_TCP_HTTP2", | 33 | my $host_tcp_http2 = getTestParameter( "NP_HOST_TCP_HTTP2", |
34 | "A host providing an index page containing the string 'nagios'", | 34 | "A host providing an index page containing the string 'monitoring'", |
35 | "nagios.org" ); | 35 | "monitoring-plugins.org" ); |
36 | 36 | ||
37 | 37 | ||
38 | $res = NPTest->testCmd( | 38 | $res = NPTest->testCmd( |
@@ -62,23 +62,23 @@ cmp_ok( $res->return_code, '==', 2, "Webserver $hostname_invalid not valid" ); | |||
62 | like( $res->output, "/Unable to open TCP socket|Socket timeout after/", "Output OK"); | 62 | like( $res->output, "/Unable to open TCP socket|Socket timeout after/", "Output OK"); |
63 | 63 | ||
64 | SKIP: { | 64 | SKIP: { |
65 | skip "No host serving nagios in index file", 7 unless $host_tcp_http2; | 65 | skip "No host serving monitoring in index file", 7 unless $host_tcp_http2; |
66 | 66 | ||
67 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nagios'" ); | 67 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'monitoring'" ); |
68 | cmp_ok( $res->return_code, "==", 0, "Got a reference to 'nagios'"); | 68 | cmp_ok( $res->return_code, "==", 0, "Got a reference to 'monitoring'"); |
69 | 69 | ||
70 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nAGiOs'" ); | 70 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'mONiTORing'" ); |
71 | cmp_ok( $res->return_code, "==", 2, "Not got 'nAGiOs'"); | 71 | cmp_ok( $res->return_code, "==", 2, "Not got 'mONiTORing'"); |
72 | like ( $res->output, "/pattern not found/", "Error message says 'pattern not found'"); | 72 | like ( $res->output, "/pattern not found/", "Error message says 'pattern not found'"); |
73 | 73 | ||
74 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -R 'nAGiOs'" ); | 74 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -R 'mONiTORing'" ); |
75 | cmp_ok( $res->return_code, "==", 0, "But case insensitive doesn't mind 'nAGiOs'"); | 75 | cmp_ok( $res->return_code, "==", 0, "But case insensitive doesn't mind 'mONiTORing'"); |
76 | 76 | ||
77 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nagios' --invert-regex" ); | 77 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'monitoring' --invert-regex" ); |
78 | cmp_ok( $res->return_code, "==", 2, "Invert results work when found"); | 78 | cmp_ok( $res->return_code, "==", 2, "Invert results work when found"); |
79 | like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); | 79 | like ( $res->output, "/pattern found/", "Error message says 'pattern found'"); |
80 | 80 | ||
81 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'nAGiOs' --invert-regex" ); | 81 | $res = NPTest->testCmd( "./check_http -H $host_tcp_http2 -r 'mONiTORing' --invert-regex" ); |
82 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); | 82 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); |
83 | } | 83 | } |
84 | SKIP: { | 84 | SKIP: { |