diff options
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_disk.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index 275db70d..73f1e374 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
@@ -23,7 +23,7 @@ my $mountpoint2_valid = getTestParameter( "NP_MOUNTPOINT2_VALID", "Path to anoth | |||
23 | if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { | 23 | if ($mountpoint_valid eq "" or $mountpoint2_valid eq "") { |
24 | plan skip_all => "Need 2 mountpoints to test"; | 24 | plan skip_all => "Need 2 mountpoints to test"; |
25 | } else { | 25 | } else { |
26 | plan tests => 86; | 26 | plan tests => 88; |
27 | } | 27 | } |
28 | 28 | ||
29 | $result = NPTest->testCmd( | 29 | $result = NPTest->testCmd( |
@@ -126,7 +126,7 @@ my $free_mb_on_all = $free_mb_on_mp1 + $free_mb_on_mp2; | |||
126 | 126 | ||
127 | 127 | ||
128 | $result = NPTest->testCmd( "./check_disk -e -w 1 -c 1 -p $more_free" ); | 128 | $result = NPTest->testCmd( "./check_disk -e -w 1 -c 1 -p $more_free" ); |
129 | is( $result->only_output, "DISK OK", "No print out of disks with -e for OKs"); | 129 | is( $result->only_output, "DISK OK - No disks were found for provided parameters;", "No print out of disks with -e for OKs"); |
130 | 130 | ||
131 | $result = NPTest->testCmd( "./check_disk 100 100 $more_free" ); | 131 | $result = NPTest->testCmd( "./check_disk 100 100 $more_free" ); |
132 | cmp_ok( $result->return_code, '==', 0, "Old syntax okay" ); | 132 | cmp_ok( $result->return_code, '==', 0, "Old syntax okay" ); |
@@ -368,9 +368,9 @@ cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact m | |||
368 | like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /etc;.*$/', 'Output OK'); | 368 | like( $result->output, '/^DISK OK - No disks were found for provided parameters; ignored paths: /etc;.*$/', 'Output OK'); |
369 | 369 | ||
370 | # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (regex) | 370 | # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (regex) |
371 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/$'"); | 371 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r '/bob' -r '^/\$'"); |
372 | cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching"); | 372 | cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching"); |
373 | like( $result->output, '/^DISK OK - free space: / .*$/', 'Output OK'); | 373 | like( $result->output, '/^DISK OK - free space: \/ .*$/', 'Output OK'); |
374 | 374 | ||
375 | # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (path) | 375 | # ignore-missing: exit okay, when checking one existing fs and one non-existing fs (path) |
376 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p '/bob' -p '/'"); | 376 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p '/bob' -p '/'"); |