[monitoring-plugins] check_load: Remove output formatting test and ...

Lorenz Kästle git at monitoring-plugins.org
Sun Jul 6 23:40:12 CEST 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 205b97b3e2133b14fbaab98f81b5f5991cfca1e9
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Thu Mar 13 23:48:33 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=205b97b3

check_load: Remove output formatting test and adapt others

---

 plugins/t/check_load.t | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/plugins/t/check_load.t b/plugins/t/check_load.t
index bba8947c..3e453703 100644
--- a/plugins/t/check_load.t
+++ b/plugins/t/check_load.t
@@ -16,28 +16,28 @@ my $successScaledOutput = "/^LOAD OK - scaled load average: $loadValue, $loadVal
 my $failureOutput = "/^LOAD CRITICAL - total load average: $loadValue, $loadValue, $loadValue/";
 my $failurScaledOutput = "/^LOAD CRITICAL - scaled load average: $loadValue, $loadValue, $loadValue - total load average: $loadValue, $loadValue, $loadValue/";
 
-plan tests => 13;
+plan tests => 8;
 
 $res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100" );
 cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
-like( $res->output, $successOutput, "Output OK");
+# like( $res->output, $successOutput, "Output OK");
 
 $res = NPTest->testCmd( "./check_load -w 0,0,0 -c 0,0,0" );
 cmp_ok( $res->return_code, 'eq', 2, "Load over 0");
-like( $res->output, $failureOutput, "Output OK");
+# like( $res->output, $failureOutput, "Output OK");
 
 $res = NPTest->testCmd( "./check_load -r -w 0,0,0 -c 0,0,0" );
 cmp_ok( $res->return_code, 'eq', 2, "Load over 0 with per cpu division");
-like( $res->output, $failurScaledOutput, "Output OK");
+# like( $res->output, $failurScaledOutput, "Output OK");
 
 $res = NPTest->testCmd( "./check_load -w 100 -c 100,110" );
 cmp_ok( $res->return_code, 'eq', 0, "Plugin can handle non-triplet-arguments");
-like( $res->output, $successOutput, "Output OK");
-like( $res->perf_output, "/load1=$loadValue;100.000;100.000/", "Test handling of non triplet thresholds (load1)");
-like( $res->perf_output, "/load5=$loadValue;100.000;110.000/", "Test handling of non triplet thresholds (load5)");
-like( $res->perf_output, "/load15=$loadValue;100.000;110.000/", "Test handling of non triplet thresholds (load15)");
+# like( $res->output, $successOutput, "Output OK");
+like( $res->perf_output, "/load1=$loadValue;~:100.0+;~:100.0+/", "Test handling of non triplet thresholds (load1)");
+like( $res->perf_output, "/load5=$loadValue;~:100.0+;~:110.0+/", "Test handling of non triplet thresholds (load5)");
+like( $res->perf_output, "/load15=$loadValue;~:100.0+;~:110.0+/", "Test handling of non triplet thresholds (load15)");
 
 
 $res = NPTest->testCmd( "./check_load -w 100,100,100 -c 100,100,100 -r" );
 cmp_ok( $res->return_code, 'eq', 0, "load not over 100");
-like( $res->output, $successScaledOutput, "Output OK");
+# like( $res->output, $successScaledOutput, "Output OK");



More information about the Commits mailing list