[monitoring-plugins] Add testcases

RincewindsHat git at monitoring-plugins.org
Tue Mar 15 21:10:12 CET 2022


 Module: monitoring-plugins
 Branch: check_icmp_buffer_offerflow
 Commit: 525c9026a7df47675ae3104a25231f6c35fb0b13
 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=525c902

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 55edc31..71cc5b3 100644
--- a/plugins-root/t/check_icmp.t
+++ b/plugins-root/t/check_icmp.t
@@ -89,3 +89,14 @@ $res = NPTest->testCmd(
 is( $res->return_code, 0, "IPv4 source_ip accepted" );
 like( $res->output, $successOutput, "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