diff options
author | Sven Nierlein <sven@nierlein.de> | 2017-03-18 22:48:35 +0100 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2017-03-18 22:48:35 +0100 |
commit | d5d347d7ce9fe25a07d32fb10fda47de3b029ee8 (patch) | |
tree | 02a97de41c8dda48d51bc633b7cfb888367f311c /plugins/tests | |
parent | 7360d2f06a44a7527a16c7a5ad32c55356cbec9d (diff) | |
download | monitoring-plugins-d5d347d.tar.gz |
check_curl: make check_curl use the same tests as check_http
Diffstat (limited to 'plugins/tests')
l--------- | plugins/tests/check_curl.t | 1 | ||||
-rwxr-xr-x | plugins/tests/check_http.t | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/tests/check_curl.t b/plugins/tests/check_curl.t new file mode 120000 index 00000000..a54db967 --- /dev/null +++ b/plugins/tests/check_curl.t | |||
@@ -0,0 +1 @@ | |||
check_http.t \ No newline at end of file | |||
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 | ||
32 | my $plugin = 'check_http'; | ||
33 | $plugin = 'check_curl' if $0 =~ m/check_curl/mx; | ||
34 | |||
32 | if ($@) { | 35 | if ($@) { |
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 | ||
181 | my $result; | 184 | my $result; |
182 | my $command = "./check_http -H 127.0.0.1"; | 185 | my $command = "./$plugin -H 127.0.0.1"; |
183 | 186 | ||
184 | run_common_tests( { command => "$command -p $port_http" } ); | 187 | run_common_tests( { command => "$command -p $port_http" } ); |
185 | SKIP: { | 188 | SKIP: { |