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 1bc0ecb7..dd567069 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -29,13 +29,16 @@ eval {
29 require HTTP::Response; 29 require HTTP::Response;
30}; 30};
31 31
32my $plugin = 'check_http';
33$plugin = 'check_curl' if $0 =~ m/check_curl/mx;
34
32if ($@) { 35if ($@) {
33 plan skip_all => "Missing required module for test: $@"; 36 plan skip_all => "Missing required module for test: $@";
34} else { 37} else {
35 if (-x "./check_http") { 38 if (-x "./$plugin") {
36 plan tests => $common_tests * 2 + $ssl_only_tests; 39 plan tests => $common_tests * 2 + $ssl_only_tests;
37 } else { 40 } else {
38 plan skip_all => "No check_http compiled"; 41 plan skip_all => "No $plugin compiled";
39 } 42 }
40} 43}
41 44
@@ -179,7 +182,7 @@ if ($ARGV[0] && $ARGV[0] eq "-d") {
179} 182}
180 183
181my $result; 184my $result;
182my $command = "./check_http -H 127.0.0.1"; 185my $command = "./$plugin -H 127.0.0.1";
183 186
184run_common_tests( { command => "$command -p $port_http" } ); 187run_common_tests( { command => "$command -p $port_http" } );
185SKIP: { 188SKIP: {