diff options
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r-- | plugins/t/check_http.t | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index c137f7b..1f2fbdf 100644 --- a/plugins/t/check_http.t +++ b/plugins/t/check_http.t | |||
@@ -9,7 +9,7 @@ use Test::More; | |||
9 | use POSIX qw/mktime strftime/; | 9 | use POSIX qw/mktime strftime/; |
10 | use NPTest; | 10 | use NPTest; |
11 | 11 | ||
12 | plan tests => 50; | 12 | plan tests => 49; |
13 | 13 | ||
14 | my $successOutput = '/OK.*HTTP.*second/'; | 14 | my $successOutput = '/OK.*HTTP.*second/'; |
15 | 15 | ||
@@ -103,7 +103,7 @@ SKIP: { | |||
103 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); | 103 | cmp_ok( $res->return_code, "==", 0, "And also when not found"); |
104 | } | 104 | } |
105 | SKIP: { | 105 | SKIP: { |
106 | skip "No internet access", 23 if $internet_access eq "no"; | 106 | skip "No internet access", 22 if $internet_access eq "no"; |
107 | 107 | ||
108 | $res = NPTest->testCmd( | 108 | $res = NPTest->testCmd( |
109 | "./$plugin --ssl $host_tls_http" | 109 | "./$plugin --ssl $host_tls_http" |
@@ -166,12 +166,6 @@ SKIP: { | |||
166 | like ( $res->output, '/time_connect=[\d\.]+/', 'Extended Performance Data Output OK' ); | 166 | like ( $res->output, '/time_connect=[\d\.]+/', 'Extended Performance Data Output OK' ); |
167 | like ( $res->output, '/time_ssl=[\d\.]+/', 'Extended Performance Data SSL Output OK' ); | 167 | like ( $res->output, '/time_ssl=[\d\.]+/', 'Extended Performance Data SSL Output OK' ); |
168 | 168 | ||
169 | $res = NPTest->testCmd( | ||
170 | "./$plugin --ssl -H www.e-paycobalt.com" | ||
171 | ); | ||
172 | cmp_ok( $res->return_code, "==", 0, "Can read https for www.e-paycobalt.com (uses AES certificate)" ); | ||
173 | |||
174 | |||
175 | $res = NPTest->testCmd( "./$plugin -H www.mozilla.com -u /firefox -f follow" ); | 169 | $res = NPTest->testCmd( "./$plugin -H www.mozilla.com -u /firefox -f follow" ); |
176 | is( $res->return_code, 0, "Redirection based on location is okay"); | 170 | is( $res->return_code, 0, "Redirection based on location is okay"); |
177 | 171 | ||
@@ -184,13 +178,13 @@ SKIP: { | |||
184 | 178 | ||
185 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -u http://$host_tcp_http -e 200,301,302"); | 179 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -u http://$host_tcp_http -e 200,301,302"); |
186 | is( $res->return_code, 0, "Proxy HTTP works"); | 180 | is( $res->return_code, 0, "Proxy HTTP works"); |
187 | like($res->output, qr/OK: Status line output matched/, "Proxy HTTP Output is sufficent"); | 181 | like($res->output, qr/OK: Status line output matched/, "Proxy HTTP Output is sufficient"); |
188 | 182 | ||
189 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT"); | 183 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT"); |
190 | is( $res->return_code, 0, "Proxy HTTP CONNECT works"); | 184 | is( $res->return_code, 0, "Proxy HTTP CONNECT works"); |
191 | like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficent"); | 185 | like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficient"); |
192 | 186 | ||
193 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT:HEAD"); | 187 | $res = NPTest->testCmd( "./$plugin -I $host_tcp_proxy -p $port_tcp_proxy -H $host_tls_http -S -j CONNECT:HEAD"); |
194 | is( $res->return_code, 0, "Proxy HTTP CONNECT works with override method"); | 188 | is( $res->return_code, 0, "Proxy HTTP CONNECT works with override method"); |
195 | like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficent"); | 189 | like($res->output, qr/HTTP OK:/, "Proxy HTTP CONNECT output sufficient"); |
196 | } | 190 | } |