[monitoring-plugins] tests: check_proc tests fail if uid -2 does not ...

Sven Nierlein git at monitoring-plugins.org
Fri Jun 13 16:20:09 CEST 2014


 Module: monitoring-plugins
 Branch: master
 Commit: 4102eaae0e50d514eb277e12c9ab382aed3a888c
 Author: Sven Nierlein <Sven.Nierlein at consol.de>
   Date: Fri Jun 13 15:57:21 2014 +0200
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=4102eaa

tests: check_proc tests fail if uid -2 does not map to nobody

so make sure our tests only run if -2 maps to nobody

Signed-off-by: Sven Nierlein <Sven.Nierlein at consol.de>

---

 plugins/tests/check_procs.t | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t
index b153d5d..54d43d9 100755
--- a/plugins/tests/check_procs.t
+++ b/plugins/tests/check_procs.t
@@ -50,6 +50,7 @@ SKIP: {
 
 SKIP: {
     skip 'user with uid -2 required', 8 unless getpwuid(-2);
+    skip 'uid -2 must have name "nobody"', 8 unless getpwuid(-2) eq 'nobody';
 
     $result = NPTest->testCmd( "$command -u -2 -w 2:2" );
     is( $result->return_code, 1, "Checking processes with userid=-2" );



More information about the Commits mailing list