summaryrefslogtreecommitdiffstats
path: root/plugins-root
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-12-03 01:22:07 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-03-15 21:03:37 +0100
commit525c9026a7df47675ae3104a25231f6c35fb0b13 (patch)
tree9ff92ebed96f4eaf19b4d5261a808ee91f4184aa /plugins-root
parent906d00af3cfd3411c36e7ba8b5aaf6e0596a2b33 (diff)
downloadmonitoring-plugins-525c902.tar.gz
Add testcases
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/t/check_icmp.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t
index 55edc31b..71cc5b38 100644
--- a/plugins-root/t/check_icmp.t
+++ b/plugins-root/t/check_icmp.t
@@ -89,3 +89,14 @@ $res = NPTest->testCmd(
89is( $res->return_code, 0, "IPv4 source_ip accepted" ); 89is( $res->return_code, 0, "IPv4 source_ip accepted" );
90like( $res->output, $successOutput, "Output OK" ); 90like( $res->output, $successOutput, "Output OK" );
91 91
92$res = NPTest->testCmd(
93 "$sudo ./check_icmp -H ::1 -b 65507"
94 );
95is( $res->return_code, 0, "Try max paket size" );
96like( $res->output, $successOutput, "Output OK - Didn't overflow" );
97
98$res = NPTest->testCmd(
99 "$sudo ./check_icmp -H ::1 -vvv"
100 );
101is( $res->return_code, 0, "Try IPv6 and vvv" );
102like( $res->output, $successOutput, "Output OK - Didn't overflow" );