summaryrefslogtreecommitdiffstats
path: root/plugins/tests/check_http.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/tests/check_http.t')
-rwxr-xr-xplugins/tests/check_http.t12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t
index 0f56950..188f5e7 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -91,6 +91,8 @@ if ($pid) {
91 exit; 91 exit;
92 } 92 }
93 } else { 93 } else {
94 # closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise
95 local $SIG{'PIPE'} = 'IGNORE';
94 my $d = HTTP::Daemon::SSL->new( 96 my $d = HTTP::Daemon::SSL->new(
95 LocalPort => $port_https, 97 LocalPort => $port_https,
96 LocalAddr => "127.0.0.1", 98 LocalAddr => "127.0.0.1",
@@ -415,22 +417,24 @@ sub run_common_tests {
415 417
416 # stickyport - on full urlS port is set back to 80 otherwise 418 # stickyport - on full urlS port is set back to 80 otherwise
417 $cmd = "$command -f stickyport -u /redir_external -t 5 -s redirected"; 419 $cmd = "$command -f stickyport -u /redir_external -t 5 -s redirected";
420 alarm(2);
418 eval { 421 eval {
419 local $SIG{ALRM} = sub { die "alarm\n" }; 422 local $SIG{ALRM} = sub { die "alarm\n" };
420 alarm(2);
421 $result = NPTest->testCmd( $cmd ); 423 $result = NPTest->testCmd( $cmd );
422 alarm(0); }; 424 };
423 isnt( $@, "alarm\n", $cmd ); 425 isnt( $@, "alarm\n", $cmd );
426 alarm(0);
424 is( $result->return_code, 0, $cmd ); 427 is( $result->return_code, 0, $cmd );
425 428
426 # Let's hope there won't be any web server on :80 returning "redirected"! 429 # Let's hope there won't be any web server on :80 returning "redirected"!
427 $cmd = "$command -f sticky -u /redir_external -t 5 -s redirected"; 430 $cmd = "$command -f sticky -u /redir_external -t 5 -s redirected";
431 alarm(2);
428 eval { 432 eval {
429 local $SIG{ALRM} = sub { die "alarm\n" }; 433 local $SIG{ALRM} = sub { die "alarm\n" };
430 alarm(2);
431 $result = NPTest->testCmd( $cmd ); 434 $result = NPTest->testCmd( $cmd );
432 alarm(0); }; 435 };
433 isnt( $@, "alarm\n", $cmd ); 436 isnt( $@, "alarm\n", $cmd );
437 alarm(0);
434 isnt( $result->return_code, 0, $cmd ); 438 isnt( $result->return_code, 0, $cmd );
435 439
436 # Test an external address - timeout 440 # Test an external address - timeout