diff options
author | Jonas Genannt <jonas@brachium-system.net> | 2014-09-23 12:51:55 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-10-06 20:16:00 +0200 |
commit | 3b02d7fafba6ef35cac9af47ce046f9c7a6fc510 (patch) | |
tree | 6ef6f29b759aa1bccd5b982a68a9963b37b072a4 /plugins-scripts/t | |
parent | 849eb5725c28acabab5d08266a4ee8b905c81a0c (diff) | |
download | monitoring-plugins-3b02d7fafba6ef35cac9af47ce046f9c7a6fc510.tar.gz |
check_file_age: Provide performance data
Diffstat (limited to 'plugins-scripts/t')
-rw-r--r-- | plugins-scripts/t/check_file_age.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins-scripts/t/check_file_age.t b/plugins-scripts/t/check_file_age.t index a5156491..50a2e699 100644 --- a/plugins-scripts/t/check_file_age.t +++ b/plugins-scripts/t/check_file_age.t @@ -5,13 +5,14 @@ # use strict; -use Test::More tests => 16; +use Test::More tests => 17; use NPTest; my $successOutput = '/^FILE_AGE OK: /'; my $warningOutput = '/^FILE_AGE WARNING: /'; my $criticalOutput = '/^FILE_AGE CRITICAL: /'; my $unknownOutput = '/^FILE_AGE UNKNOWN: /'; +my $performanceOutput = '/ \| age=[0-9]+s;[0-9]+;[0-9]+ size=[0-9]+B;[0-9]+;[0-9]+;0$/'; my $result; my $temp_file = "/tmp/check_file_age.tmp"; @@ -58,6 +59,11 @@ $result = NPTest->testCmd( cmp_ok( $result->return_code, '==', 0, "Checking file size" ); $result = NPTest->testCmd( + "./check_file_age -f $temp_file -c 1000 -W 100" + ); +like( $result->output, $performanceOutput, "Checking for performance Output" ); + +$result = NPTest->testCmd( "./check_file_age -f /non/existent --ignore-missing" ); cmp_ok( $result->return_code, '==', 0, "Honours --ignore-missing" ); |