summaryrefslogtreecommitdiffstats
path: root/src/tests/intg/ldap_test.py
Commit message (Collapse)AuthorAgeFilesLines
* LDAP: Shortcut looking up for group members soonerJakub Hrozek2016-06-231-0/+40
| | | | | | | | | | | | | | | | This patch is a performance enhancement. When looking for entries to refresh, we always looked up all members in the cache, even if we ended up dereferencing the whole group. If we are about to try dereference, it makes sense to shortcut the lookups after the dereference threshold is reached. In that case, the split_members function returns a special error code and the caller just dereferences the whole group. Only if dereference fails, we fall back to looking up all members so that we can look them up one-by-one. Also adds an integration test to make sure the dereference code works. Reviewed-by: Sumit Bose <sbose@redhat.com>
* intg: Use different uid range for add_remove testsLukas Slebodnik2016-04-221-2/+2
| | | | | | | | | | | Most linux distribution create local users from UID 1000. We used similar UID space in sssd but it might caused issues in add remove tests becuase sssd in cwrap enviroment run in the same PID space. If sssd try to remove user with uid 1001 it will fail because the local user with the same UID is active and sssd does not remove active users. Reviewed-by: Petr Cech <pcech@redhat.com>
* intg: Add more LDAP testsNikolai Kondrashov2015-11-141-0/+361
| | | | | | | | | | | | | | Add a bunch of LDAP tests. * Adding/removing a user/group/membership with rfc2307(bis) schema. * The effect of override_homedir option. * The effect of fallback_homedir option. * The effect of override_shell option. * The effect of shell_fallback option. * The effect of default_shell option. * The effect of vetoed_shells option. Reviewed-by: Michal Židek <mzidek@redhat.com>
* Revert "intg: Invalidate memory cache before removing files"Lukas Slebodnik2015-11-111-1/+0
| | | | | | | | | It is not necessary to invalidate memory cache before removing them. The sssd_client can handle it without any problem. This reverts commit eabc1732ef91548616a699b7e9f8d30e5e7b8dd3. Reviewed-by: Michal Židek <mzidek@redhat.com>
* intg_tests: Fix PEP8 warningsLukas Slebodnik2015-10-261-2/+4
| | | | Reviewed-by: Michal Židek <mzidek@redhat.com>
* intg: Fix all PEP8 issuesNikolai Kondrashov2015-10-221-19/+37
| | | | Reviewed-by: Michal Židek <mzidek@redhat.com>
* intg: Reduce sssd.conf duplication in test_ldap.pyNikolai Kondrashov2015-10-091-95/+45
| | | | | | | Use a function to generate basic sssd.conf in test_ldap.py to reduce code duplication. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* intg: Split LDAP test fixtures for flexibilityNikolai Kondrashov2015-10-091-30/+83
| | | | | | | Split ldap_test.py fixtures into several functions to allow for partial fixtures and direct use within tests. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* intg: Get base DN from LDAP connection objectNikolai Kondrashov2015-10-091-4/+4
| | | | | | | | Don't use the global LDAP_BASE_DN in integration tests and fixtures, but instead take it from the LDAP connection object (ldap_conn) passed to them explicitly. This makes the tests and fixtures a bit more modular. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* intg: Fix some PEP 8 violationsMichal Židek2015-09-031-0/+7
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* CI: Add regression test for #2676Michal Židek2015-09-031-0/+61
| | | | | | | | | Ticket: https://fedorahosted.org/sssd/ticket/2676 Regression test for the above ticket. Reviewed-by: Pavel Reichl <preichl@redhat.com>
* CONFDB: Assume config file version 2 if missingMichal Židek2015-09-031-2/+0
| | | | | | | | | | Default to config file version 2 if the version is not specified explicitly. Ticket: https://fedorahosted.org/sssd/ticket/2688 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* intg_tests: Add regression test for 2163Lukas Slebodnik2015-09-011-0/+40
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* intg: Invalidate memory cache before removing filesLukas Slebodnik2015-07-241-0/+1
| | | | | | | Workaround for: https://fedorahosted.org/sssd/ticket/2726 Reviewed-by: Michal Židek <mzidek@redhat.com>
* Add integration testsNikolai Kondrashov2015-05-281-0/+261
Add "intgcheck" make target. Update CI to use it. The "intgcheck" target configures and builds sssd in a sub-directory, installs it into a prefix in another sub-directory, and then makes the "intgcheck-installed" target from within src/tests/intg in that separate build. The "intgcheck-installed" target in src/tests/intg runs py.test for all tests it can find in that directory, under fakeroot and nss_wrapper/uid_wrapper environments emulating running under root. It also adds the value of INTGCHECK_PYTEST_ARGS environment/make variable to the py.test command line. You can use it to pass additional py.test options, such as specifying a subset of tests to run. See "py.test --help" output. There are only two test suites in src/tests/intg at the moment: ent_test.py and ldap_test.py. The ent_test.py runs tests on ent.py - a module of assertion functions for checking entries in NSS database (passwd and group), for use in actual tests. The ent_test.py suite can be used as ent.py usage reference. The ldap_test.py suite sets up and starts a slapd instance, adds a few user and group entries, configures and starts sssd and verifies that those users and groups are retrieved correctly using various NSS functions. The tests are very basic at the moment. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Michal Židek <mzidek@redhat.com>