summaryrefslogtreecommitdiffstats
path: root/plugins/tests/check_http.t
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2020-05-19 09:53:30 +0200
committerGitHub <noreply@github.com>2020-05-19 09:53:30 +0200
commit00948e95f43953359d3a9de6a9dc664723ad7374 (patch)
tree04a87c488f5eb1d13c1a59abb2eafda518226b20 /plugins/tests/check_http.t
parentb12358535458b853d287551054331e477b58320a (diff)
parent772fb233b92d4ad5fc87f30a8efee5c9bb295d1d (diff)
downloadmonitoring-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-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 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
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: {