diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 (GMT) |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2005-12-15 15:19:55 (GMT) |
commit | e03d87d8aef6701e7245b98800e67b64319bf7b2 (patch) | |
tree | 28b466594f6b6e33dd707d75625b016eb2d0edc1 /plugins/t/check_disk.t | |
parent | 73b77a44c43960b6fcf8b3c29c1016ba1940aa89 (diff) | |
download | monitoring-plugins-e03d87d8aef6701e7245b98800e67b64319bf7b2.tar.gz |
New 3 parameter version of getTestParameters. Updated check_disk.t to reflect.
Added notes re: testing in developer guidelines.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1298 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/t/check_disk.t')
-rw-r--r-- | plugins/t/check_disk.t | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index d35d02c..385865f 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
@@ -6,7 +6,7 @@ | |||
6 | # | 6 | # |
7 | 7 | ||
8 | use strict; | 8 | use strict; |
9 | use Test::More tests => 26; | 9 | use Test::More; |
10 | use NPTest; | 10 | use NPTest; |
11 | use POSIX qw(ceil floor); | 11 | use POSIX qw(ceil floor); |
12 | 12 | ||
@@ -16,12 +16,14 @@ my $warningOutput = '/^DISK WARNING - /'; | |||
16 | 16 | ||
17 | my $result; | 17 | my $result; |
18 | 18 | ||
19 | my $mountpoint_valid = getTestParameter( "mountpoint_valid", "NP_MOUNTPOINT_VALID", "/", | 19 | my $mountpoint_valid = getTestParameter( "NP_MOUNTPOINT_VALID", "Path to valid mountpoint", "/"); |
20 | "The path to a valid mountpoint" ); | 20 | my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to another valid mountpoint. Must be different from 1st one", "/var"); |
21 | |||
22 | my $mountpoint2_valid = getTestParameter( "mountpoint2_valid", "NP_MOUNTPOINT2_VALID", "/var", | ||
23 | "The path to another valid mountpoint. Must be different from 1st one." ); | ||
24 | 21 | ||
22 | if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { | ||
23 | plan skip_all => "Need 2 mountpoints to test"; | ||
24 | } else { | ||
25 | plan tests => 26; | ||
26 | } | ||
25 | 27 | ||
26 | $result = NPTest->testCmd( | 28 | $result = NPTest->testCmd( |
27 | "./check_disk -w 1% -c 1% -p $mountpoint_valid -w 1% -c 1% -p $mountpoint2_valid" | 29 | "./check_disk -w 1% -c 1% -p $mountpoint_valid -w 1% -c 1% -p $mountpoint2_valid" |