summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_nested_groups.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: Use unique name for TEST_PATHLukas Slebodnik2015-09-181-1/+1
| | | | | | | | | | | | | | We had a cases in patch where two tests were using the same TEST_PATH and therefore they were stepping each other to the same files which caused failures. These failures are not easy to reproduce. This patch uses macro BASE_FILE_STEM for unique name. It should prevent copy&paste problem resulting to intermittent failures. @see also https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: Move N_ELEMENTS definition to tests/common.hJakub Hrozek2015-07-151-3/+0
| | | | | | Avoids code duplication Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* TESTS: Move krb5_try_kdcip to nested group testJakub Hrozek2015-06-141-0/+8
| | | | | | Avoids duplicate errors during linking. Reviewed-by: Sumit Bose <sbose@redhat.com>
* TESTS: Add a common function to set up sdap_id_ctxJakub Hrozek2015-06-141-7/+7
| | | | | | Reduces code duplication between tests. Reviewed-by: Sumit Bose <sbose@redhat.com>
* TESTS: Add a common mock_be_ctx functionJakub Hrozek2015-06-141-3/+2
| | | | | | Reduces code duplication between tests. Reviewed-by: Sumit Bose <sbose@redhat.com>
* tests: convert all unit tests to cmocka 1.0 or laterJakub Hrozek2015-03-111-7/+9
| | | | | | All tests now use the cmocka-1.0-compatible API. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* test_nested_groups: Additional unit testsLukas Slebodnik2015-01-301-0/+165
| | | | | | | Unit test for: https://fedorahosted.org/sssd/ticket/2531 Reviewed-by: Pavel Reichl <preichl@redhat.com>
* TESTS: Mock return value of sdap_get_generic_recvLukas Slebodnik2015-01-301-0/+8
| | | | Reviewed-by: Pavel Reichl <preichl@redhat.com>
* tests: remove code duplication in single domain cleanupPavel Březina2015-01-091-3/+2
| | | | Reviewed-by: Michal Židek <mzidek@redhat.com>
* Only check GID if ID-mappingJakub Hrozek2014-07-231-0/+20
| | | | Reviewed-by: Sumit Bose <sbose@redhat.com>
* TOOLS: Always debug to stderrJakub Hrozek2014-07-091-1/+1
| | | | | | | | | https://fedorahosted.org/sssd/ticket/2348 Programs that are supposed to only be executed on the foreground should log to stderr automatically. Reviewed-by: Michal Židek <mzidek@redhat.com>
* TESTS: Do not rely on order of hash itemsJakub Hrozek2014-07-071-32/+50
| | | | | | | | | The nested group test was checking returned elements in a particular order. That's not reliable because the returned values are fetched from a hash iterator that doesn't guarantee the same order on different systems. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Add more tests for nested groups processingJakub Hrozek2014-07-011-1/+265
| | | | | | | | | | Adds unit test for basic group retrieval functionality as well as for testing duplicate members in the LDAP group entry. These unit tests exercise code added in patch a47cb2e08e4004179d2a6b5f9a9340200270fbd0 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Fix group search baseJakub Hrozek2014-07-011-1/+1
| | | | | | | After fixing the confdb initialization I realized the group DN couldn't be parsed. This patch fixes that. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Use the right confdb pathJakub Hrozek2014-07-011-1/+1
| | | | | | | The nested group test only worked by accident. Its confdb settings were not applied because a wrong confdb path was used. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Remove unused macrosLukas Slebodnik2014-03-121-1/+0
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TEST: Remove unused argument sysdb_pathLukas Slebodnik2014-03-121-2/+2
| | | | | | | | | Name of sysdb file is automatically generated from domain name and db_path in function sysdb_domain_init. talloc_asprintf is called with arguments "%s/cache_%s.ldb", db_path, dom->name Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: nested groups unit testPavel Březina2014-02-181-0/+198
Resolves: https://fedorahosted.org/sssd/ticket/2024 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>