summaryrefslogtreecommitdiffstats
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* cache_req: switch to new codePavel Březina2016-10-202-3/+21
| | | | | | | This patch switch the old switch-based cache req code to the new plugin-based. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TESTS: Fix check for py bindings in dlopen testsFabiano Fidêncio2016-10-171-2/+2
| | | | | | | | | The current code checks only for "HAVE_PYTHON_BINDINGS", which is not even a valid check. Let's do the proper check according to the python version (HAVE_PYTHON2_BINDINGS or HAVE_PYTHON3_BINDINGS). Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Adding intg. tests on nested groupsPetr Čech2016-10-141-0/+157
| | | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2940 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: Add tests for getorig by UPN NSS opJakub Hrozek2016-10-111-0/+34
| | | | | Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* tests: Add tests for sidbyname NSS operationJakub Hrozek2016-10-111-0/+129
| | | | | Reviewed-by: Sumit Bose <sbose@redhat.com> Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
* TESTS: Remove a leftover debug messageFabiano Fidêncio2016-10-071-1/+0
| | | | | | | | | The debug message was introduced when I was testing 65a38b8c9, but ended up not removed before submitting the patch. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Petr Cech <pcech@redhat.com>
* SECRETS: Add a configurable limit of secrets that can be storedFabiano Fidêncio2016-10-051-0/+16
| | | | | | | Related: https://fedorahosted.org/sssd/ticket/3169 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* SECRETS: Add a configurable depth limit for nested containersFabiano Fidêncio2016-10-031-0/+12
| | | | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/3168 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* KRB5: Fixing FQ name of user in krb5_setup()Petr Čech2016-09-221-13/+20
| | | | | | | | | | This patch fixes creation of FQ username if krb5_map_user option ise used. Resolves: https://fedorahosted.org/sssd/ticket/3188 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* tests: Add a regression test for upstream ticket #3131Jakub Hrozek2016-09-221-0/+66
| | | | | | | Tests that running two duplicate SRV resolution queries succeeds and returns a valid host name. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* TESTS: Add simple test for double semicolonLukas Slebodnik2016-09-211-0/+38
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Remove double semicolon at the end of lineLukas Slebodnik2016-09-212-7/+7
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* TESTS: Test offline netgroups resolutionJakub Hrozek2016-09-211-2/+27
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Add integration tests for the sssd-secretsJakub Hrozek2016-09-204-0/+307
| | | | | | | | | | | Implements a simple HTTP client and uses it to talk to the sssd-secrets responder. Only the local provider is tested at the moment. Resolves: https://fedorahosted.org/sssd/ticket/3054 Reviewed-by: Petr Čech <pcech@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Fixing of 'const' warnings in sbus testsPetr Čech2016-09-192-8/+9
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* p11: return a fully-qualified nameSumit Bose2016-09-161-8/+8
| | | | | | Related to https://fedorahosted.org/sssd/ticket/3165 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* p11: only set PKCS11_LOGIN_TOKEN_NAME if gdm-smartcard is usedSumit Bose2016-09-161-12/+77
| | | | | | Resolves https://fedorahosted.org/sssd/ticket/3165 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TESTS: sss_groupshow with MPGMichal Židek2016-09-131-0/+22
| | | | | | | | | Regression test for ticket #3184 Resolves: https://fedorahosted.org/sssd/ticket/3184 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TEST: Add regression test for ticket #3179Michal Židek2016-09-131-12/+114
| | | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/3179 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* TESTS: Add FQDN variants for some testsMichal Židek2016-09-071-0/+83
| | | | | | Adds FQDN variants of some already existing tests. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Test for sss_user/groupmod -aMichal Židek2016-09-071-0/+36
| | | | | | | | | Regression tests for ticket #3178. Resolves: https://fedorahosted.org/sssd/ticket/3178 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: sss_groupadd/groupshow regressionsMichal Židek2016-09-071-0/+26
| | | | | | | | | | Adds regression CI test for ticket #3173 and #3175. Resolves: https://fedorahosted.org/sssd/ticket/3173 https://fedorahosted.org/sssd/ticket/3175 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* INTG: Tests for ldap nested netgroupsPetr Cech2016-08-242-0/+460
| | | | | | | | | This patch adds tests on reproducer of t2841. Resolves: https://fedorahosted.org/sssd/ticket/2841 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* INTG: Adding support for netgroups to ldap_entPetr Cech2016-08-241-0/+19
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2841 Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* sssd_netgroup.py: Resolve nested netgroupsLukas Slebodnik2016-08-241-60/+164
| | | | Reviewed-by: Petr Čech <pcech@redhat.com>
* intg: Test extra attributes duplicateLukas Slebodnik2016-08-191-0/+50
| | | | | | | | | Regresion test for ticket #3120 Resolves: https://fedorahosted.org/sssd/ticket/3120 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_ldap: test resolving of names with special charactersLukas Slebodnik2016-08-181-0/+22
| | | | | | Integration test for #3121 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_ldap: test nested membership with rfc2307bisLukas Slebodnik2016-08-181-0/+27
| | | | | | Integration test for #3093 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* intg: Fix pep8 warningsLukas Slebodnik2016-08-183-14/+26
| | | | | | | | E302 expected 2 blank lines, found 1 E303 too many blank lines (2) E501 line too long (84 > 79 characters) Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* sssd_id.py: Primary group should be returned for initgroupsLukas Slebodnik2016-08-182-3/+23
| | | | | | | | | Side effect of this change was that some primary groups could not be resolved and therefore get_user_groups failed in override tests. We should do the same as "id user". return decimal representation GID if it cannot be mapped to name. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* intg: create ldap test without enumerationLukas Slebodnik2016-08-182-0/+698
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_enumeration: Remove test without enumerationLukas Slebodnik2016-08-181-115/+11
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* intg: rename test with enumerationLukas Slebodnik2016-08-182-1/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_local_domain: Restore correct env variableLukas Slebodnik2016-08-181-1/+1
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* ds.py: Do not call teardown in destructorLukas Slebodnik2016-08-181-4/+0
| | | | | | | | | We use finalizers in pytest for cleaning up of openldap server. But sometimes destructor was called in case of failure which causes many issues in tests. Running teardown in destructor is not reliable due to pyhton nature. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* TESTS: Adding tests for ad_enabled_domains optionPetr Cech2016-08-171-0/+328
| | | | | | | | | | | | There is special logic around ad_enabled_domains option: * option is disabled by default * master domain is always added to enabled domains Resolves: https://fedorahosted.org/sssd/ticket/2828 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* Make resolv_is_address() function public and create some basic testsJustin Stephenson2016-08-161-0/+25
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2789 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* DP: Remove old data provider interfacePavel Březina2016-08-161-1/+0
| | | | | | | | | Reverse data provider interface is moved to a better location in NSS responder. All responders now can have an sbus interface defined per data provider connection. The unused old data provider interface is removed. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TESTS: Use the DP handlers in simple provider tests, add more testsJakub Hrozek2016-08-101-21/+165
| | | | | | | Use the full simple access control handlers, just like SSSD does in the tests. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* dyndns-tests: Fix false positive failuresLukas Slebodnik2016-08-101-0/+1
| | | | | | | | | | | | | | The child process finished faster then it has handled by parent and therefore it timed out. It's the similar solution as in b3074dca3acebd91437ef13d3329d6d65d655215 [ RUN ] dyndns_test_error (Fri Jul 29 16:12:00:621444 2016) [sssd] [nsupdate_child_timeout] (0x0020): Timeout reached for dynamic DNS update Could not run the test - check test fixtures [ ERROR ] dyndns_test_error Reviewed-by: Petr Čech <pcech@redhat.com>
* SYSDB: Avoid optimisation with modifyTimestamp for usersLukas Slebodnik2016-08-101-14/+0
| | | | | | | | | | | | | | | The usage of modifyTimestamp needn't be a reliable way for detecting of changes in user entry in LDAP. The authorisation need to rely current data from LDAP and therefore we will temporary disable optimisation with modifyTimestamp and we will rather rely on deep comparison of attributes. In he future, it might be changed and responders might control the optimization level. Resolves: https://fedorahosted.org/sssd/ticket/3110 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* intg: Allow to test netgroupsLukas Slebodnik2016-08-102-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | | sh-4.2# getent netgroup -s sss QAUsers QAUsers ( ,qa1,example.com) ( ,qa2,example.com) ( ,qa3,example.com) sh-4.2# getent netgroup -s sss QASystems QASystems (qahost1.example.com,,) (qahost2.lab.eng.pnq.redhat.com,,) sh-4.2# getent netgroup -s sss test sh-4.2# echo $? 2 sh-4.2# python Python 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sssd_netgroup >>> sssd_netgroup.get_sssd_netgroups('QAUsers') (1, 0, [(None, 'qa1', 'example.com'), (None, 'qa2', 'example.com'), (None, 'qa3', 'example.com')]) >>> sssd_netgroup.get_sssd_netgroups('QASystems') (1, 0, [('qahost1.example.com', None, None), ('qahost2.lab.eng.pnq.redhat.com', None, None)]) >>> sssd_netgroup.get_sssd_netgroups('test') (0, 0, []) >>> Reviewed-by: Petr Čech <pcech@redhat.com>
* intg: Make location of sssd nss module configurableLukas Slebodnik2016-08-102-1/+2
| | | | | | | | | | | | | | | | | | | | | | The path to sssd nss module (libsss_nss.so) was relative to prefix and expected subdirectory "lib". 32bit and 64bit platforms and different distributions use different paths. This patch allows to use python module sssd_id even with real module and not just integration tests. It is just required to prepare "config.py" with right path. e.g. cd ~/sssd/src/tests/intg [~/sssd/src/tests/intg]$ echo "NSS_MODULE_DIR = '/usr/lib64'" > config.py [~/sssd/src/tests/intg]$ python Python 2.7.12 (default, Jul 18 2016, 09:57:01) [GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sssd_id >>> sssd_id.get_user_gids('user') (1, 0, [5977, 1070, 5845, 1076, 1074, 10327, 5975, 5766]) Reviewed-by: Petr Čech <pcech@redhat.com>
* utils: add remove_subtreePavel Březina2016-08-091-0/+53
| | | | | | | Remove all entries in a directory but will not remove the directory itself. Reviewed-by: Petr Cech <pcech@redhat.com>
* SYSDB: Fix setting dataExpireTimestamp if sysdb is supposed to set the ↵Jakub Hrozek2016-08-051-0/+83
| | | | | | | | | | | | | current time sysdb is already able to retrieve the current timestamp if the caller doesn't specify it. However, for the timestamp cache this came too late and the timestamp cache used zero as the 'now' time. Resolves: https://fedorahosted.org/sssd/ticket/3064 Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* SDAP: add enterprise principal strings for user searchesSumit Bose2016-07-291-0/+34
| | | | | | | | | | Unfortunately principal aliases with an alternative realm are stored in IPA as the string representation of an enterprise principal, i.e. name\@alt.realm@IPA.REALM. To be able to lookup the alternative principal in LDAP properly the UPN search filter is extended to search for this type of name as well. Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* utils: add is_email_from_domain()Sumit Bose2016-07-291-0/+21
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* views: properly override group member namesSumit Bose2016-07-291-9/+9
| | | | | | Resolves https://fedorahosted.org/sssd/ticket/2948 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_utils: Fixing assignment discards 'const' qualifierPetr Cech2016-07-261-2/+2
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* tests: add tests for netlogon_get_domain_infoSumit Bose2016-07-251-0/+81
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>