summaryrefslogtreecommitdiffstats
path: root/plugins/t/check_load.t
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/t/check_load.t')
-rw-r--r--plugins/t/check_load.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t
index 0804ac6..da87d16 100644
--- a/plugins/t/check_load.t
+++ b/plugins/t/check_load.t
@@ -14,7 +14,7 @@ my $res;
14my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; 14my $successOutput = '/^OK - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/';
15my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/'; 15my $failureOutput = '/^CRITICAL - load average: [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+, [0-9]+\.?[0-9]+/';
16 16
17plan tests => 4; 17plan tests => 6;
18 18
19$res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" ); 19$res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" );
20cmp_ok( $res->return_code, 'eq', 0, "load not over 100"); 20cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
@@ -24,3 +24,7 @@ $res = NPTest->testCmd( "./check_load -w 0,0,0 -c 0,0,0" );
24cmp_ok( $res->return_code, 'eq', 2, "Load over 0"); 24cmp_ok( $res->return_code, 'eq', 2, "Load over 0");
25like( $res->output, $failureOutput, "Output OK"); 25like( $res->output, $failureOutput, "Output OK");
26 26
27$res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" );
28cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division");
29like( $res->output, $failureOutput, "Output OK");
30