diff options
Diffstat (limited to 'plugins/t')
| -rw-r--r-- | plugins/t/check_disk.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/t/check_disk.t b/plugins/t/check_disk.t index ec527e7f..bea34a4c 100644 --- a/plugins/t/check_disk.t +++ b/plugins/t/check_disk.t | |||
| @@ -351,3 +351,18 @@ unlike( $result->output, qr/$mountpoint2_valid/, "output data does not have $mou | |||
| 351 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '^barbazJodsf\$'"); | 351 | $result = NPTest->testCmd( "./check_disk -w 0% -c 0% -p $mountpoint_valid -p $mountpoint2_valid -i '^barbazJodsf\$'"); |
| 352 | like( $result->output, qr/$mountpoint_valid/, "ignore: output data does have $mountpoint_valid when regex doesn't match"); | 352 | like( $result->output, qr/$mountpoint_valid/, "ignore: output data does have $mountpoint_valid when regex doesn't match"); |
| 353 | like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mountpoint2_valid when regex doesn't match"); | 353 | like( $result->output, qr/$mountpoint2_valid/,"ignore: output data does have $mountpoint2_valid when regex doesn't match"); |
| 354 | |||
| 355 | # ignore-missing: exit okay, when fs is not accessible | ||
| 356 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -p /bob"); | ||
| 357 | cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for not existing filesystem /bob"); | ||
| 358 | like( $result->output, '/^DISK OK - /bob is not accessible .*$/', 'Output OK'); | ||
| 359 | |||
| 360 | # ignore-missing: exit okay, when regex does not match | ||
| 361 | $result = NPTest->testCmd( "./check_disk --ignore-missing -w 0% -c 0% -r /bob"); | ||
| 362 | cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay for regular expression not matching"); | ||
| 363 | like( $result->output, '/^DISK OK: Regular expression did not match any path or disk.*$/', 'Output OK'); | ||
| 364 | |||
| 365 | # ignore-missing: exit okay, when fs with exact match (-E) is not found | ||
| 366 | $result = NPTest->testCmd( "./check_disk --ignore-missing -E -w 0% -c 0% -p /etc"); | ||
| 367 | cmp_ok( $result->return_code, '==', 0, "ignore-missing: return okay when exact match does not find fs"); | ||
| 368 | like( $result->output, '/^DISK OK: /etc not found.*$/', 'Output OK'); | ||
