From 79cf6e9760422cc2e311d9408a613f2b839ef2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Tue, 27 Jun 2017 16:45:25 +0200 Subject: [PATCH] Added another check to get installed apps in SSL test. --- tests/test_ssl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test_ssl.py b/tests/test_ssl.py index f912a0bd..6413c0d2 100755 --- a/tests/test_ssl.py +++ b/tests/test_ssl.py @@ -34,10 +34,16 @@ conf_servers = ( ('CM_SERVER_NAME', 'campusmanager'), ) +with open('/etc/hosts', 'r') as fo: + hosts = fo.read() + for s, d in conf_servers: v = conf.get(s) if v == d: - # vhost is using default value (the service is surely not installed) + # vhost is using default value, the service is surely not installed + continue + if v not in hosts: + # the domain is not in the hosts file, the service is surely not installed continue try: url = 'https://%s' % v -- GitLab