aboutsummaryrefslogtreecommitdiff
path: root/plugins/tests/check_http.t
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.de> 2017-03-18 22:48:35 +0100
committerGravatar Sven Nierlein <sven@nierlein.de> 2018-10-22 16:30:31 +0200
commite9239b556a4748bb06f5f46a2bedbf0114cd099a (patch)
tree0f5276b8f3862c20db927033679277b3132e7a9e /plugins/tests/check_http.t
parentdee8f760d3c9935a52b1d49b63940f35b3656dc8 (diff)
downloadmonitoring-plugins-e9239b556a4748bb06f5f46a2bedbf0114cd099a.tar.gz
check_curl: make check_curl use the same tests as check_http
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 d6d31de1..f5c570ac 100755
--- a/plugins/tests/check_http.t
+++ b/plugins/tests/check_http.t
@@ -30,13 +30,16 @@ eval {
require HTTP::Response;
};
+my $plugin = 'check_http';
+$plugin = 'check_curl' if $0 =~ m/check_curl/mx;
+
if ($@) {
plan skip_all => "Missing required module for test: $@";
} else {
- if (-x "./check_http") {
+ if (-x "./$plugin") {
plan tests => $common_tests * 2 + $ssl_only_tests + $virtual_port_tests;
} else {
- plan skip_all => "No check_http compiled";
+ plan skip_all => "No $plugin compiled";
}
}
@@ -185,7 +188,7 @@ if ($ARGV[0] && $ARGV[0] eq "-d") {
}
my $result;
-my $command = "./check_http -H 127.0.0.1";
+my $command = "./$plugin -H 127.0.0.1";
run_common_tests( { command => "$command -p $port_http" } );
SKIP: {