diff --git a/tests/test_nginx_conf_valid.sh b/tests/test_nginx_conf_valid.sh index b50ce14f758d92926143a976f41b51d94a267e04..2a735552333129934012d7ad3aa8a839d0102606 100755 --- a/tests/test_nginx_conf_valid.sh +++ b/tests/test_nginx_conf_valid.sh @@ -3,5 +3,7 @@ set -e if ( which nginx >/dev/null ); then - nginx -t + nginx -t +else + exit 2 fi diff --git a/tests/test_nginx_status.py b/tests/test_nginx_status.py index d25431115177cdb19f9f12888ee3dd2921ceeb15..61260da376d13901c0b58f23af1cbfd1089acca9 100755 --- a/tests/test_nginx_status.py +++ b/tests/test_nginx_status.py @@ -10,6 +10,7 @@ import sys if not os.path.exists('/etc/nginx'): print('Nginx dir does not exists, test skipped.') + sys.exit(2) else: print('Checking http://127.0.0.1:1080/nginx_status response.') try: diff --git a/tests/test_nginx_vhosts.py b/tests/test_nginx_vhosts.py index 46009f46ecd7c2232b0cb2591f854094d09613df..f9dc59cbece36f56d30f5890593c84242224c2d3 100755 --- a/tests/test_nginx_vhosts.py +++ b/tests/test_nginx_vhosts.py @@ -20,7 +20,7 @@ This script checks for all enabled vhosts in Nginx conf that: nginx_dir = '/etc/nginx/sites-enabled' if not os.path.exists(nginx_dir): print('Nginx dir does not exists ("%s").' % nginx_dir) - sys.exit(0) + sys.exit(2) # check that Wowza is installed wowza_dir = '/usr/local/WowzaStreamingEngine' diff --git a/tests/test_ntp.py b/tests/test_ntp.py index 393a582c13df3369bf075ea0a194d376a7cbce32..eb4a957e208e978bf2031a8af57a29cba8e2adf1 100755 --- a/tests/test_ntp.py +++ b/tests/test_ntp.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright 2017, Florent Thiery ''' -Check that the server is synchronized with the configured NTP server. +Checks that the server is synchronized with the configured NTP server. ''' import os import sys diff --git a/tests/test_postfix.py b/tests/test_postfix.py index 7cdebf28de82c856ea9bcdf9c3a9030812ca2cba..0e343931e35db4fdebbf7560b528386528780b5b 100755 --- a/tests/test_postfix.py +++ b/tests/test_postfix.py @@ -9,7 +9,7 @@ import sys if not os.path.exists('/etc/postfix'): - print('Postfix dir does not exists, test skipped.') + print('Postfix dir does not exists, please install postfix.') sys.exit(1) else: # check that postfix listens the port 25 correctly