[monitoring-plugins] Add testcases
RincewindsHat
git at monitoring-plugins.org
Fri Dec 3 01:30:11 CET 2021
Module: monitoring-plugins
Branch: check_icmp_buffer_offerflow
Commit: 172f10a3392b751a7130a5a5ff23e22830b3df06
Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
Date: Fri Dec 3 01:22:07 2021 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=172f10a
Add testcases
---
plugins-root/t/check_icmp.t | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t
index e043d4e..b347a66 100644
--- a/plugins-root/t/check_icmp.t
+++ b/plugins-root/t/check_icmp.t
@@ -83,3 +83,14 @@ $res = NPTest->testCmd(
is( $res->return_code, 2, "One of two host nonresponsive - two required" );
like( $res->output, $failureOutput, "Output OK" );
+$res = NPTest->testCmd(
+ "$sudo ./check_icmp -H ::1 -b 65507"
+ );
+is( $res->return_code, 0, "Try max paket size" );
+like( $res->output, $successOutput, "Output OK - Didn't overflow" );
+
+$res = NPTest->testCmd(
+ "$sudo ./check_icmp -H ::1 -vvv"
+ );
+is( $res->return_code, 0, "Try IPv6 and vvv" );
+like( $res->output, $successOutput, "Output OK - Didn't overflow" );
More information about the Commits
mailing list