diff options
author | Sven Nierlein <sven@nierlein.de> | 2020-05-19 09:53:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-19 09:53:30 +0200 |
commit | 00948e95f43953359d3a9de6a9dc664723ad7374 (patch) | |
tree | 04a87c488f5eb1d13c1a59abb2eafda518226b20 /plugins/tests/check_http.t | |
parent | b12358535458b853d287551054331e477b58320a (diff) | |
parent | 772fb233b92d4ad5fc87f30a8efee5c9bb295d1d (diff) | |
download | monitoring-plugins-00948e95f43953359d3a9de6a9dc664723ad7374.tar.gz |
Merge pull request #1535 from monitoring-plugins/feature_check_curl
Feature check curl
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 bfecff2d..2f051fad 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: { |