aboutsummaryrefslogtreecommitdiff
path: root/plugins/t/check_http.t
diff options
context:
space:
mode:
authorGravatar Aksel Sjögren <asjogren@itrsgroup.com> 2021-04-28 15:48:20 +0200
committerGravatar Jacob Hansen <jhansen@op5.com> 2021-04-30 11:13:59 +0200
commit5ab03a70950cecf5fe4ab52a3c4f9b0f6ac98939 (patch)
tree75e990ce0e29eea391e54f6267a1aa8d28b855fe /plugins/t/check_http.t
parent40e171b7cdb2262398728aa9b84e747a856d9c1f (diff)
downloadmonitoring-plugins-5ab03a70950cecf5fe4ab52a3c4f9b0f6ac98939.tar.gz
Fix conditional tests for check_http, check_curl
Set correct number of tests in skip- blocks to avoid the error "Bad plan. You planned 50 tests but ran 55" when run with/without /usr/bin/faketime and NP_INTERNET_ACCESS=yes/no.
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r--plugins/t/check_http.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index e92681e9..c137f7b4 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -103,7 +103,7 @@ SKIP: {
cmp_ok( $res->return_code, "==", 0, "And also when not found");
}
SKIP: {
- skip "No internet access", 16 if $internet_access eq "no";
+ skip "No internet access", 23 if $internet_access eq "no";
$res = NPTest->testCmd(
"./$plugin --ssl $host_tls_http"
@@ -135,7 +135,7 @@ SKIP: {
# run some certificate checks with faketime
SKIP: {
- skip "No faketime binary found", 12 if !$faketime;
+ skip "No faketime binary found", 7 if !$faketime;
$res = NPTest->testCmd("LC_TIME=C TZ=UTC ./$plugin -C 1 $host_tls_http");
like($res->output, qr/OK - Certificate '$host_tls_cert' will expire on/, "Catch cert output");
is( $res->return_code, 0, "Catch cert output exit code" );