summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a3e7f9)
raw | patch | inline | side by side (parent: 9a3e7f9)
author | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Wed, 9 May 2007 08:16:44 +0000 (08:16 +0000) | ||
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Wed, 9 May 2007 08:16:44 +0000 (08:16 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1707 f882894a-f735-0410-b71e-b25c423dba1c
plugins/t/check_disk.t | patch | blob | history |
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t
index 2ec6cabb0589342832f7aa4a50e8d4c85cc0dae9..5c6aa39a3538713369379961d7283fb669ff8706 100644 (file)
--- a/plugins/t/check_disk.t
+++ b/plugins/t/check_disk.t
if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") {
plan skip_all => "Need 2 mountpoints to test";
} else {
- plan tests => 68;
+ plan tests => 69;
}
$result = NPTest->testCmd(
$result = NPTest->testCmd( "./check_disk -w 1 -c 1 -p $more_free -p $less_free" );
cmp_ok( $result->return_code, '==', 0, "At least 1 MB available on $more_free and $less_free");
$_ = $result->output;
-print $result->output."\n";
my ($free_mb_on_mp1, $free_mb_on_mp2) = (m/(\d+) MB .* (\d+) MB /g);
my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2;
-print "$free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2\n";
# Checking old syntax of check_disk warn crit [fs], with warn/crit at USED% thresholds
$result = NPTest->testCmd( "./check_disk 0 0 ".${mountpoint_valid} );
cmp_ok( $result->return_code, "==", 2, "Old syntax: 0% used");
+like ( $result->only_output, qr(^[^;]*;[^;]*$), "Select only one path with positional arguments");
$result = NPTest->testCmd( "./check_disk 100 100 $mountpoint_valid" );
cmp_ok( $result->return_code, '==', 0, "Old syntax: 100% used" );