diff options
Diffstat (limited to 'plugins/tests/check_http.t')
-rwxr-xr-x | plugins/tests/check_http.t | 9 |
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 | ||
35 | my $plugin = 'check_http'; | ||
36 | $plugin = 'check_curl' if $0 =~ m/check_curl/mx; | ||
37 | |||
35 | if ($@) { | 38 | if ($@) { |
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 | ||
189 | my $result; | 192 | my $result; |
190 | my $command = "./check_http -H 127.0.0.1"; | 193 | my $command = "./$plugin -H 127.0.0.1"; |
191 | 194 | ||
192 | run_common_tests( { command => "$command -p $port_http" } ); | 195 | run_common_tests( { command => "$command -p $port_http" } ); |
193 | SKIP: { | 196 | SKIP: { |