[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From 1eb0204eeba72a653229533f9936158229affbab Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- src/tests/multihost/alltests/pytest.ini | 1 + src/tests/multihost/alltests/readme.rst | 1 + .../alltests/test_local_overrides.py | 60 +++ 3 files changed, 62 insertions(+) create mode 100644 src/tests/multihost/alltests/test_local_overrides.py diff --git a/src/tests/multihost/alltests/pytest.ini b/src/tests/multihost/alltests/pytest.ini index 66519e8003..ac127c07f3 100644 --- a/src/tests/multihost/alltests/pytest.ini +++ b/src/tests/multihost/alltests/pytest.ini @@ -9,6 +9,7 @@ markers = krb5: Tests related to krb5 kcm: Tests related to kcm ldapextraattrs: Tests related to Ldap Extra attributes +localoverrides: Tests related to Local Overrides multidomain: Tests related to SSSD Multiple Domains netgroup: Tests related to netgroup offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/readme.rst b/src/tests/multihost/alltests/readme.rst index dd750b358a..13fa8cc56c 100644 --- a/src/tests/multihost/alltests/readme.rst +++ b/src/tests/multihost/alltests/readme.rst @@ -20,6 +20,7 @@ Following are the pytest markers used * krb5: Tests related to krb5 * kcm: Tests related to kcm * ldapextraattrs: Tests related to Ldap Extra attributes +* localoverrides: Tests related to Local Overrides * multidomain: Tests related to SSSD Multiple Domains * netgroup: Tests related to netgroup * offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/test_local_overrides.py b/src/tests/multihost/alltests/test_local_overrides.py new file mode 100644 index 00..ccfb193be3 --- /dev/null +++ b/src/tests/multihost/alltests/test_local_overrides.py @@ -0,0 +1,60 @@ +""" Automation of localoverrides suite + +:requirement: local_overrides +:casecomponent: sssd +:subsystemteam: sst_idm_sssd +:upstream: yes +""" +from __future__ import print_function +import re +import pytest +from sssd.testlib.common.utils import sssdTools +from constants import ds_instance_name +import time + + +@pytest.mark.usefixtures('setup_sssd', 'create_posix_usersgroups') +@pytest.mark.localoverrides +class TestLocalOverrides(object): +""" +This is test case class for local overrides suite +""" +@pytest.mark.tier1_2 +def test_0001_bz1919942(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:customerscenario: true +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +:steps: + 1. Edit sssd.conf and set homedir, i.e. + `override_homedir = /home/%u1` + 2. Restart sssd and check homedir + 3. Use `sss_override` to set a + different home directory + 4. Restart sssd and use getent command + to check home directory, which is still set to same. +:expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines:
[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From fdb833d03e5c3eb9c4b9e01da011ead0ceff6b28 Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- src/tests/multihost/alltests/pytest.ini | 1 + src/tests/multihost/alltests/readme.rst | 1 + .../alltests/test_local_overrides.py | 60 +++ 3 files changed, 62 insertions(+) create mode 100644 src/tests/multihost/alltests/test_local_overrides.py diff --git a/src/tests/multihost/alltests/pytest.ini b/src/tests/multihost/alltests/pytest.ini index 66519e8003..ac127c07f3 100644 --- a/src/tests/multihost/alltests/pytest.ini +++ b/src/tests/multihost/alltests/pytest.ini @@ -9,6 +9,7 @@ markers = krb5: Tests related to krb5 kcm: Tests related to kcm ldapextraattrs: Tests related to Ldap Extra attributes +localoverrides: Tests related to Local Overrides multidomain: Tests related to SSSD Multiple Domains netgroup: Tests related to netgroup offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/readme.rst b/src/tests/multihost/alltests/readme.rst index dd750b358a..13fa8cc56c 100644 --- a/src/tests/multihost/alltests/readme.rst +++ b/src/tests/multihost/alltests/readme.rst @@ -20,6 +20,7 @@ Following are the pytest markers used * krb5: Tests related to krb5 * kcm: Tests related to kcm * ldapextraattrs: Tests related to Ldap Extra attributes +* localoverrides: Tests related to Local Overrides * multidomain: Tests related to SSSD Multiple Domains * netgroup: Tests related to netgroup * offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/test_local_overrides.py b/src/tests/multihost/alltests/test_local_overrides.py new file mode 100644 index 00..98c754009b --- /dev/null +++ b/src/tests/multihost/alltests/test_local_overrides.py @@ -0,0 +1,60 @@ +""" Automation of localoverrides suite + +:requirement: localoverrides +:casecomponent: sssd +:subsystemteam: sst_idm_sssd +:upstream: yes +""" +from __future__ import print_function +import re +import pytest +from sssd.testlib.common.utils import sssdTools +from constants import ds_instance_name +import time + + +@pytest.mark.usefixtures('setup_sssd', 'create_posix_usersgroups') +@pytest.mark.localoverrides +class TestLocalOverrides(object): +""" +This is test case class for local overrides suite +""" +@pytest.mark.tier1_2 +def test_0007_bz1919942(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:customerscenario: true +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +:steps: + 1. Edit sssd.conf and set homedir, i.e. + `override_homedir = /home/%u1` + 2. Restart sssd and check homedir + 3. Use `sss_override` to set a + different home directory + 4. Restart sssd and use getent command + to check home directory, which is still set to same. +:expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines:
[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From b876d812bf5477389fd3e0fb809db45d9d6ace73 Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- src/tests/multihost/alltests/pytest.ini | 1 + src/tests/multihost/alltests/readme.rst | 1 + .../alltests/test_local_overrides.py | 60 +++ 3 files changed, 62 insertions(+) create mode 100644 src/tests/multihost/alltests/test_local_overrides.py diff --git a/src/tests/multihost/alltests/pytest.ini b/src/tests/multihost/alltests/pytest.ini index 66519e8003..ac127c07f3 100644 --- a/src/tests/multihost/alltests/pytest.ini +++ b/src/tests/multihost/alltests/pytest.ini @@ -9,6 +9,7 @@ markers = krb5: Tests related to krb5 kcm: Tests related to kcm ldapextraattrs: Tests related to Ldap Extra attributes +localoverrides: Tests related to Local Overrides multidomain: Tests related to SSSD Multiple Domains netgroup: Tests related to netgroup offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/readme.rst b/src/tests/multihost/alltests/readme.rst index dd750b358a..13fa8cc56c 100644 --- a/src/tests/multihost/alltests/readme.rst +++ b/src/tests/multihost/alltests/readme.rst @@ -20,6 +20,7 @@ Following are the pytest markers used * krb5: Tests related to krb5 * kcm: Tests related to kcm * ldapextraattrs: Tests related to Ldap Extra attributes +* localoverrides: Tests related to Local Overrides * multidomain: Tests related to SSSD Multiple Domains * netgroup: Tests related to netgroup * offline: Tests related to ldap offline suite diff --git a/src/tests/multihost/alltests/test_local_overrides.py b/src/tests/multihost/alltests/test_local_overrides.py new file mode 100644 index 00..0f3d9aa781 --- /dev/null +++ b/src/tests/multihost/alltests/test_local_overrides.py @@ -0,0 +1,60 @@ +""" Automation of ldap_extra_attr suite + +:requirement: localoverrides +:casecomponent: sssd +:subsystemteam: sst_idm_sssd +:upstream: yes +""" +from __future__ import print_function +import re +import pytest +from sssd.testlib.common.utils import sssdTools +from constants import ds_instance_name +import time + + +@pytest.mark.usefixtures('setup_sssd', 'create_posix_usersgroups') +@pytest.mark.localoverrides +class TestLocalOverrides(object): +""" +This is test case class for local overrides suite +""" +@pytest.mark.tier1_2 +def test_0007_bz1919942(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:customerscenario: true +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +:steps: + 1. Edit sssd.conf and set homedir, i.e. + `override_homedir = /home/%u1` + 2. Restart sssd and check homedir + 3. Use `sss_override` to set a + different home directory + 4. Restart sssd and use getent command + to check home directory, which is still set to same. +:expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines:
[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From a393b748b2d274b6ed36fc7ea48e0c83d61de2f2 Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- .../alltests/test_ldap_extra_attrs.py | 40 +++ 1 file changed, 40 insertions(+) diff --git a/src/tests/multihost/alltests/test_ldap_extra_attrs.py b/src/tests/multihost/alltests/test_ldap_extra_attrs.py index a493fb558b..bfd1fb3120 100644 --- a/src/tests/multihost/alltests/test_ldap_extra_attrs.py +++ b/src/tests/multihost/alltests/test_ldap_extra_attrs.py @@ -193,3 +193,43 @@ def test_0006_bz1667252(self, multihost): cmd = multihost.client[0].run_command(sssctl_cmd) ret = multihost.client[0].service_sssd('status') assert ret == 0 + +@pytest.mark.tier1_2 +def test_0007_bz1919942(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:customerscenario: true +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +:steps: + 1. Edit sssd.conf and set homedir, i.e. + `override_homedir = /home/%u1` + 2. Restart sssd and check homedir + 3. Use `sss_override` to set a + different home directory + 4. Restart sssd and use getent command + to check home directory, which is still set to same. +:expectedresults: + 1. Should succeed + 2. Should succeed + 3. Should succeed + 4. Should succeed +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://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 Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From bf9845e06655215aac011506e57db11bdd8a2c56 Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- .../alltests/test_ldap_extra_attrs.py | 26 +++ 1 file changed, 26 insertions(+) diff --git a/src/tests/multihost/alltests/test_ldap_extra_attrs.py b/src/tests/multihost/alltests/test_ldap_extra_attrs.py index a493fb558b..793eacd43f 100644 --- a/src/tests/multihost/alltests/test_ldap_extra_attrs.py +++ b/src/tests/multihost/alltests/test_ldap_extra_attrs.py @@ -193,3 +193,29 @@ def test_0006_bz1667252(self, multihost): cmd = multihost.client[0].run_command(sssctl_cmd) ret = multihost.client[0].service_sssd('status') assert ret == 0 + +@pytest.mark.tier1 +def test_0007_bz1919942(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://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 Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
[SSSD][sssd PR#5814][synchronized] Tests: sss_override does not take precedence over override_homedir di…
URL: https://github.com/SSSD/sssd/pull/5814 Author: aborah-sudo Title: #5814: Tests: sss_override does not take precedence over override_homedir di… Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5814/head:pr5814 git checkout pr5814 From e9332914166567d2340c8eae8f3516f1ebc3e00c Mon Sep 17 00:00:00 2001 From: Anuj Borah Date: Wed, 6 Oct 2021 17:59:51 +0530 Subject: [PATCH] Tests: sss_override does not take precedence over override_homedir directive bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 --- .../alltests/test_ldap_extra_attrs.py | 26 +++ 1 file changed, 26 insertions(+) diff --git a/src/tests/multihost/alltests/test_ldap_extra_attrs.py b/src/tests/multihost/alltests/test_ldap_extra_attrs.py index a493fb558b..adda62bf70 100644 --- a/src/tests/multihost/alltests/test_ldap_extra_attrs.py +++ b/src/tests/multihost/alltests/test_ldap_extra_attrs.py @@ -193,3 +193,29 @@ def test_0006_bz1667252(self, multihost): cmd = multihost.client[0].run_command(sssctl_cmd) ret = multihost.client[0].service_sssd('status') assert ret == 0 + +@pytest.mark.tier1 +def test_0007_bz1416150(self, multihost, +backupsssdconf): +""" +:title: ifp: sss_override does not take + precedence over override_homedir directive +:id: d2e98c70-26a0-11ec-bcf5-845cf3eff344 +:bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1919942 +""" +tools = sssdTools(multihost.client[0]) +domain_name = tools.get_domain_section_name() +client = sssdTools(multihost.client[0]) +domain_params = {'override_homedir': '/home/%u1'} +client.sssd_conf(f'domain/{domain_name}', domain_params) +multihost.client[0].service_sssd('restart') +before = multihost.client[0].run_command("getent passwd " + "foo5@example1") +assert before.returncode == 0 +multihost.client[0].run_command("sss_override " +"user-add foo5@example1 -h " +"/home/foo56") +multihost.client[0].service_sssd('restart') +after = multihost.client[0].run_command("getent passwd " +"foo5@example1") +assert "User:/home/foo56" in after.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://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 Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure