diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2022-07-25 11:39:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 11:39:36 +0200 |
commit | 4ff0dfa44306c4e8a7dc46fcb1c508f7a191638b (patch) | |
tree | 4d4bcd647a832268907afda672c36bbdedecbc8a /plugins-root/t | |
parent | cebb054091e9255b2e2e672b53a8aa4bd39608b4 (diff) | |
parent | 3ad5fe9d84138da1451429bfac3b9b4024393d25 (diff) | |
download | monitoring-plugins-4ff0dfa.tar.gz |
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins-root/t')
-rw-r--r-- | plugins-root/t/check_icmp.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t index e043d4ed..f6aa6813 100644 --- a/plugins-root/t/check_icmp.t +++ b/plugins-root/t/check_icmp.t | |||
@@ -12,7 +12,7 @@ my $allow_sudo = getTestParameter( "NP_ALLOW_SUDO", | |||
12 | "no" ); | 12 | "no" ); |
13 | 13 | ||
14 | if ($allow_sudo eq "yes" or $> == 0) { | 14 | if ($allow_sudo eq "yes" or $> == 0) { |
15 | plan tests => 16; | 15 | plan tests => 20; |
16 | } else { | 16 | } else { |
17 | plan skip_all => "Need sudo to test check_icmp"; | 17 | plan skip_all => "Need sudo to test check_icmp"; |
18 | } | 18 | } |
@@ -83,3 +83,14 @@ $res = NPTest->testCmd( | |||
83 | is( $res->return_code, 2, "One of two host nonresponsive - two required" ); | 83 | is( $res->return_code, 2, "One of two host nonresponsive - two required" ); |
84 | like( $res->output, $failureOutput, "Output OK" ); | 84 | like( $res->output, $failureOutput, "Output OK" ); |
85 | 85 | ||
86 | $res = NPTest->testCmd( | ||
87 | "$sudo ./check_icmp -H $host_responsive -s 127.0.15.15 -w 10000ms,100% -c 10000ms,100% -n 1 -m 2" | ||
88 | ); | ||
89 | is( $res->return_code, 0, "IPv4 source_ip accepted" ); | ||
90 | like( $res->output, $successOutput, "Output OK" ); | ||
91 | |||
92 | $res = NPTest->testCmd( | ||
93 | "$sudo ./check_icmp -H $host_responsive -b 65507" | ||
94 | ); | ||
95 | is( $res->return_code, 0, "Try max paket size" ); | ||
96 | like( $res->output, $successOutput, "Output OK - Didn't overflow" ); | ||