URL: https://github.com/SSSD/sssd/pull/5439 Author: madhuriupadhye Title: #5439: Tests: alltests: "ldap_library_debug_level" option to domain section Action: opened
PR body: """ Configure single domain and check "ldap_library_debug_level" parameter. It consists of three test cases: 1. Check ldap_library_debug_level option with config-check 2. Set ldap_library_debug_level to zero and check corresponding logs 3. Set ldap_library_debug_level to two and check corresponding logs Verifies: Issue: #5178 Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207 """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5439/head:pr5439 git checkout pr5439
From ab11bb02e957e83991dd76bcbc57296901c0fffd Mon Sep 17 00:00:00 2001 From: Madhuri Upadhye <mupad...@redhat.com> Date: Fri, 18 Dec 2020 16:49:58 +0530 Subject: [PATCH] Tests: alltests: "ldap_library_debug_level" option to domain section Configure single domain and check "ldap_library_debug_level" parameter. It consists of three test cases: 1. Check ldap_library_debug_level option with config-check 2. Set ldap_library_debug_level to zero and check corresponding logs 3. Set ldap_library_debug_level to two and check corresponding logs Verifies: Issue: #5178 Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1884207 --- .../alltests/test_ldap_library_debug_level.py | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/tests/multihost/alltests/test_ldap_library_debug_level.py diff --git a/src/tests/multihost/alltests/test_ldap_library_debug_level.py b/src/tests/multihost/alltests/test_ldap_library_debug_level.py new file mode 100644 index 0000000000..04682f50d1 --- /dev/null +++ b/src/tests/multihost/alltests/test_ldap_library_debug_level.py @@ -0,0 +1,58 @@ +from __future__ import print_function +import re +import pytest +from sssd.testlib.common.utils import sssdTools +from constants import ds_instance_name + + +@pytest.mark.usefixtures('setup_sssd', 'create_posix_usersgroups') +@pytest.mark.ldapliblevel +class TestLdapLibDebugLevel(object): + """ Test ldap_library_debug_level option""" + + @pytest.mark.tier1 + def test_0001_bz1884207(self, multihost, backupsssdconf): + """ + @Title: ldap_library_debug_level: Check ldap_library_debug_level + option with config-check + """ + section = "domain/%s" % ds_instance_name + tools = sssdTools(multihost.client[0]) + domain_params = {'ldap_library_debug_level': '0'} + tools.sssd_conf(section, domain_params) + multihost.client[0].service_sssd('restart') + sssctl_cmd = 'sssctl config-check' + cmd = multihost.client[0].run_command(sssctl_cmd, raiseonerr=False) + assert cmd.returncode == 0 + + @pytest.mark.tier1 + def test_0002_bz1884207(self, multihost, backupsssdconf): + """ + @Title: ldap_library_debug_level: Set ldap_library_debug_level to + zero and check corresponding logs + """ + section = "domain/%s" % ds_instance_name + tools = sssdTools(multihost.client[0]) + domain_params = {'ldap_library_debug_level': '0'} + tools.sssd_conf(section, domain_params) + tools.clear_sssd_cache() + logfile = '/var/log/sssd/sssd_%s.log' % ds_instance_name + log_str = multihost.client[0].get_file_contents(logfile) + find = re.compile(r'libldap') + assert not find.search(log_str.decode()) + + @pytest.mark.m1 + def test_0003_bz1884207(self, multihost, backupsssdconf): + """ + @Title: ldap_library_debug_level: Set ldap_library_debug_level to + two and check corresponding logs + """ + section = "domain/%s" % ds_instance_name + tools = sssdTools(multihost.client[0]) + domain_params = {'ldap_library_debug_level': '2'} + tools.sssd_conf(section, domain_params) + tools.clear_sssd_cache() + logfile = '/var/log/sssd/sssd_%s.log' % ds_instance_name + log_str1 = multihost.client[0].get_file_contents(logfile) + find = re.compile(r'libldap') + assert find.search(log_str1.decode(errors='ignore'))
_______________________________________________ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org