summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <Sven.Nierlein@consol.de>2014-06-13 15:57:21 +0200
committerSven Nierlein <Sven.Nierlein@consol.de>2014-06-13 15:57:21 +0200
commit4102eaae0e50d514eb277e12c9ab382aed3a888c (patch)
tree138f434af18563413d260d1e93fb941e04146129
parent93901d5ff10cd7fd915cc09d7c496cec49f82ce5 (diff)
downloadmonitoring-plugins-4102eaa.tar.gz
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@consol.de>
-rwxr-xr-xplugins/tests/check_procs.t1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t
index b153d5d2..54d43d9b 100755
--- a/plugins/tests/check_procs.t
+++ b/plugins/tests/check_procs.t
@@ -50,6 +50,7 @@ SKIP: {
50 50
51SKIP: { 51SKIP: {
52 skip 'user with uid -2 required', 8 unless getpwuid(-2); 52 skip 'user with uid -2 required', 8 unless getpwuid(-2);
53 skip 'uid -2 must have name "nobody"', 8 unless getpwuid(-2) eq 'nobody';
53 54
54 $result = NPTest->testCmd( "$command -u -2 -w 2:2" ); 55 $result = NPTest->testCmd( "$command -u -2 -w 2:2" );
55 is( $result->return_code, 1, "Checking processes with userid=-2" ); 56 is( $result->return_code, 1, "Checking processes with userid=-2" );