URL: https://github.com/SSSD/sssd/pull/739 Author: jhrozek Title: #739: TESTS: Add a test for extra attributes in the output of sssctl user-checks Action: opened
PR body: """ A test for: https://pagure.io/SSSD/sssd/issue/3866 """ To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/739/head:pr739 git checkout pr739
From 31498e1b62cda943976b944d201f362df15ab207 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek <jhro...@redhat.com> Date: Thu, 31 Jan 2019 22:34:36 +0100 Subject: [PATCH] TESTS: Add a test for extra attributes in the output of sssctl user-checks A test for: https://pagure.io/SSSD/sssd/issue/3866 --- .../basic/test_sssctl_config_check.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/tests/multihost/basic/test_sssctl_config_check.py b/src/tests/multihost/basic/test_sssctl_config_check.py index c50c2e64a5..d15104ddb7 100644 --- a/src/tests/multihost/basic/test_sssctl_config_check.py +++ b/src/tests/multihost/basic/test_sssctl_config_check.py @@ -3,6 +3,8 @@ import pytest import re +from utils_config import set_param + class TestSssctlConfigCheck(object): def test_verify_typo_option_name(self, multihost): @@ -84,3 +86,21 @@ def test_misplaced_option(self, multihost): assert False multihost.master[0].run_command(['/bin/cp', '-a', cfgput, cfgget], raiseonerr=False) + + +class TestSssctlUserChecks(object): + def test_user_checks_custom_attrs(self, multihost): + """ + Test that IFP extra attributes are visible from the tool + see e.g. https://pagure.io/SSSD/sssd/issue/3866 + """ + set_param(multihost, 'domain/EXAMPLE.TEST', + 'ldap_user_extra_attrs', 'extra_name:uid') + set_param(multihost, 'ifp', 'user_attributes', '+extra_name') + + multihost.master[0].service_sssd('restart') + + sssctl_cmd = 'sssctl user-checks foo1' + cmd = multihost.master[0].run_command(sssctl_cmd, + raiseonerr=False) + assert 'extra_name: foo1' in cmd.stdout_text
_______________________________________________ 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://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org