From 5e3e92f39037c0f57a6944c51104441c8938693d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Wed, 25 Jan 2017 17:52:22 +0100 Subject: [PATCH] Changed tests description (refs #20133). --- tests/test_apt.sh | 2 +- tests/test_nginx_conf_valid.sh | 2 +- tests/test_nginx_status.py | 2 +- tests/test_nginx_vhosts.py | 11 +++++++---- tests/test_ntp.sh | 2 +- tests/test_postfix.py | 4 ++-- tests/test_ubicast_packages_access.py | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tests/test_apt.sh b/tests/test_apt.sh index 04ca7dad..bc476a3a 100755 --- a/tests/test_apt.sh +++ b/tests/test_apt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Check that the installation of an Ubuntu package using APT works. +# Check that updates can be installed. set -e echo "Testing apt-get install" diff --git a/tests/test_nginx_conf_valid.sh b/tests/test_nginx_conf_valid.sh index d6b5a3fa..b50ce14f 100755 --- a/tests/test_nginx_conf_valid.sh +++ b/tests/test_nginx_conf_valid.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Check that the Nginx configuration files are valid. +# Checks that the webserver configuration has no errors. set -e if ( which nginx >/dev/null ); then diff --git a/tests/test_nginx_status.py b/tests/test_nginx_status.py index 882ead41..d2543111 100755 --- a/tests/test_nginx_status.py +++ b/tests/test_nginx_status.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' -Check the Nginx status vhost response. +Checks that the webserver is running. ''' import os import requests diff --git a/tests/test_nginx_vhosts.py b/tests/test_nginx_vhosts.py index 5c7965aa..61bc0a4a 100755 --- a/tests/test_nginx_vhosts.py +++ b/tests/test_nginx_vhosts.py @@ -1,10 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' -This script checks for all enabled vhosts in Nginx conf that: -* The response status code is 200 or 403. -* The host is resolved as 127.0.0.1. -* The Wowza response is correct on /streaming/ (only for mediaserver vhosts). +Tests that all webserver services (vhosts) are available and reachable. ''' import os import re @@ -12,6 +9,12 @@ import requests import socket import sys +''' +This script checks for all enabled vhosts in Nginx conf that: +* The response status code is 200 or 403. +* The host is resolved as 127.0.0.1. +* The Wowza response is correct on /streaming/ (only for mediaserver vhosts). +''' # check that Nginx dir exists nginx_dir = '/etc/nginx/sites-enabled' diff --git a/tests/test_ntp.sh b/tests/test_ntp.sh index 14652ae3..3c91634b 100755 --- a/tests/test_ntp.sh +++ b/tests/test_ntp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Check that the NTP server is reachable (date synchronization). +# Check that the time synchronization server is reachable. set -e source /root/envsetup/conf.sh diff --git a/tests/test_postfix.py b/tests/test_postfix.py index eb825cec..de99cc15 100755 --- a/tests/test_postfix.py +++ b/tests/test_postfix.py @@ -1,8 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' -Check that postfix listen correctly the port 25. -Postfix is the service which handles email sendings. +Check that emails can be sent. ''' import os import re @@ -13,6 +12,7 @@ import sys if not os.path.exists('/etc/postfix'): print('Postfix dir does not exists, test skipped.') else: + # check that postfix listens the port 25 correctly out = subprocess.check_output('netstat -pant | grep \':25\'', shell=True) out = out.decode('utf-8') if out else '' diff --git a/tests/test_ubicast_packages_access.py b/tests/test_ubicast_packages_access.py index fa4e87ac..5cf3b448 100755 --- a/tests/test_ubicast_packages_access.py +++ b/tests/test_ubicast_packages_access.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' -Check that the skyreach server is reachable. +Check that updates server is reachable. ''' import os import re -- GitLab