mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
test script added
This commit is contained in:
parent
f382acb1a6
commit
2112847349
33
check_storwize/test.sh
Normal file
33
check_storwize/test.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
CURRENT_PATH=`pwd`
|
||||||
|
cd $CURRENT_PATH/tests/ok
|
||||||
|
tests=`echo * | sed 's/.txt//g'`
|
||||||
|
for i in $tests ; do
|
||||||
|
command="python $CURRENT_PATH/check_storwize.py --test -H testhost -U nagios -Q $i"
|
||||||
|
$command > /dev/null 2>&1
|
||||||
|
RESULT=$?
|
||||||
|
if [ $RESULT -ne 0 ]; then
|
||||||
|
echo "FAIL"
|
||||||
|
echo "cd `pwd`"
|
||||||
|
echo "Command: $command"
|
||||||
|
else
|
||||||
|
echo "$i working as expected"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
cd $CURRENT_PATH/tests/critical
|
||||||
|
tests=`echo * | sed 's/.txt//g'`
|
||||||
|
for i in $tests ; do
|
||||||
|
command="python $CURRENT_PATH/check_storwize.py --test -H testhost -U nagios -Q $i"
|
||||||
|
$command > /dev/null 2>&1
|
||||||
|
RESULT=$?
|
||||||
|
if [ $RESULT -ne 2 ]; then
|
||||||
|
echo "FAIL"
|
||||||
|
echo "cd `pwd`"
|
||||||
|
echo "Command: $command"
|
||||||
|
else
|
||||||
|
echo "$i working as expected"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user