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.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t
index bfecff2..2f051fa 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -32,13 +32,16 @@ eval {
32 require HTTP::Response; 32 require HTTP::Response;
33}; 33};
34 34
35my $plugin = 'check_http';
36$plugin = 'check_curl' if $0 =~ m/check_curl/mx;
37
35if ($@) { 38if ($@) {
36 plan skip_all => "Missing required module for test: $@"; 39 plan skip_all => "Missing required module for test: $@";
37} else { 40} else {
38 if (-x "./check_http") { 41 if (-x "./$plugin") {
39 plan tests => $common_tests * 2 + $ssl_only_tests + $virtual_port_tests; 42 plan tests => $common_tests * 2 + $ssl_only_tests + $virtual_port_tests;
40 } else { 43 } else {
41 plan skip_all => "No check_http compiled"; 44 plan skip_all => "No $plugin compiled";
42 } 45 }
43} 46}
44 47
@@ -187,7 +190,7 @@ if ($ARGV[0] && $ARGV[0] eq "-d") {
187} 190}
188 191
189my $result; 192my $result;
190my $command = "./check_http -H 127.0.0.1"; 193my $command = "./$plugin -H 127.0.0.1";
191 194
192run_common_tests( { command => "$command -p $port_http" } ); 195run_common_tests( { command => "$command -p $port_http" } );
193SKIP: { 196SKIP: {