From f0c3a3592818d132bd2b61e5fbe9e5b51b429a96 Mon Sep 17 00:00:00 2001 From: Mohammad Rizwan Yusuf Date: Aug 27 2018 18:31:32 +0000 Subject: Test if WSGI worker process count is set to 4 related ticket : https://pagure.io/freeipa/issue/7587 Signed-off-by: Mohammad Rizwan Yusuf Reviewed-By: Tibor Dudlak Reviewed-By: Rob Crittenden Reviewed-By: Christian Heimes Reviewed-By: Florence Blanc-Renaud --- diff --git a/ipatests/test_integration/test_installation.py b/ipatests/test_integration/test_installation.py index e8f168d..b7a9628 100644 --- a/ipatests/test_integration/test_installation.py +++ b/ipatests/test_integration/test_installation.py @@ -12,6 +12,7 @@ from __future__ import absolute_import import os import pytest from ipalib.constants import DOMAIN_LEVEL_0 +from ipaplatform.constants import constants from ipaplatform.paths import paths from ipatests.pytest_ipa.integration.env_config import get_global_config from ipatests.test_integration.base import IntegrationTest @@ -388,6 +389,21 @@ class TestInstallMaster(IntegrationTest): def test_install_dns(self): tasks.install_dns(self.master) + def test_WSGI_worker_process(self): + """ Test if WSGI worker process count is set to 4 + + related ticket : https://pagure.io/freeipa/issue/7587 + """ + # check process count in httpd conf file i.e expected string + exp = b'WSGIDaemonProcess ipa processes=%d' % constants.WSGI_PROCESSES + httpd_conf = self.master.get_file_contents(paths.HTTPD_IPA_CONF) + assert exp in httpd_conf + + # check the process count + cmd = self.master.run_command('ps -eF') + wsgi_count = cmd.stdout_text.count('wsgi:ipa') + assert constants.WSGI_PROCESSES == wsgi_count + class TestInstallMasterKRA(IntegrationTest):