From f9d776f1727ef78a6c2f05bde6d744407f903863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Fri, 1 Mar 2019 09:21:17 +0100 Subject: [PATCH] Fixed nginx vhost status code check. --- tests/test_nginx_vhosts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_nginx_vhosts.py b/tests/test_nginx_vhosts.py index c42a822d..2e12545f 100755 --- a/tests/test_nginx_vhosts.py +++ b/tests/test_nginx_vhosts.py @@ -73,7 +73,7 @@ def test_vhost(ports_info=None, domains=None, resolution_ignored=None, celerity_ req_time = 0 else: code = req.status_code - if code not in (200, 401, 403) and domain != 'localhost' and code != 404: + if domain != 'localhost' and code not in (200, 401, 403) or domain == 'localhost' and code not in (200, 401, 403, 404): sys.stdout.write('\033[91mKO (%s, %sms)\033[0m' % (code, req_time)) req_error = True else: -- GitLab