0df79781d78973e5462dbef1e89d8fd6001da05c |
|
23-Feb-2018 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Add sample infopipe test in cwrap env
Resolves:
https://pagure.io/SSSD/sssd/issue/2823
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
e64696e1fab85c42aaeda65ddf49ee1b7e3f07e1 |
|
23-Feb-2018 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Install wrapper for getsockopt
The dbus-daemon detect remote user from unix socket using
getsockopt + SO_PEERCRED. Neither fakeroot nor cwrap can fake it.
And it would take some time till patched version would get to downstream
distributions.
Resolves:
https://pagure.io/SSSD/sssd/issue/2823
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
52ae4eeba9c97c0254a2025ec3b5ffe90588b775 |
|
23-Feb-2018 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Install configuration for dbus daemon
Resolves:
https://pagure.io/SSSD/sssd/issue/2823
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
841bcb5e1f66bb9c41e1884a2ab1dae654def13e |
|
23-Feb-2018 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Do not prefer builddir in PATH
Binary files in builddir are shell wrapper for libtool
Therefore we should prefer files which are installed in $prefix
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
da7a3c347dd630085839afa7ec245ee9d36f6ce2 |
|
16-Oct-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Add sanity tests for pysss_nss_idmap
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
36df33cd44774a5b5eab52ab222bcd3240b3ca5a |
|
16-Oct-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Create FakeAD class based on openldap
FakeAD is openldap with ldif schema which allows to load static data
from real AD. Instance of class will also contain some predefined
users/groups which can be used for basic sanity testing in sssd of AD features.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
d82741b1a8ada493ca74efa5d5c8b731412d035c |
|
16-Oct-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Prefer locally built python modules
Patch prepends path to sssd python modules; so we will be
able to import them without any issue and they will be preferred over
system modules.
sh$[/tmp/sssd-intg.3gb4hzpn/var/log/sssd] python2
Python 2.7.13 (default, Aug 16 2017, 12:56:26)
[GCC 7.1.1 20170802 (Red Hat 7.1.1-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import SSSDConfig
>>> print(SSSDConfig.__file__)
/tmp/sssd-intg.3gb4hzpn/lib/python2.7/site-packages/SSSDConfig/__init__.pyc
>>> import pyhbac
>>> print(pyhbac.__file__)
/tmp/sssd-intg.3gb4hzpn/lib64/python2.7/site-packages/pyhbac.so
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
a3bed9df5a47bfc84b82341f0f7e693e2b14a67a |
|
16-Oct-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Let python paths be configurable
It will allow to prefer locally built python modules
in integration tests.
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
82c36227e36de155b13e6eb7cfa3e80a25774157 |
|
04-Oct-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Fix execution with dbus-1.11.18
Since dbus-1.11.18 DBUS_COOKIE_SHA1 respect $HOME variable
and fallback to value returned from getpwnam only if env HOME
does not exist. It caused problem for dbus communication
between sssd processes because local user usually do not have
directory $HOME/.dbus-keyrings/. And directory created in cwrap
environment is problmatic
[build@host ~]$ ls -ld ~/.dbus-keyrings/
drw-------. 2 build build 6 Oct 3 10:44 /home/build/.dbus-keyrings/
[buildhost ~]$ ls -lna ~/.dbus-keyrings/
ls: cannot access '/home/build/.dbus-keyrings/.': Permission denied
ls: cannot access '/home/build/.dbus-keyrings/..': Permission denied
total 0
d????????? ? ? ? ? ? .
d????????? ? ? ? ? ? ..
[build@host ~]$ touch ~/.dbus-keyrings/test
touch: cannot touch '/home/build/.dbus-keyrings/test': Permission denied
Other alternative would be to set env variable HOME to the
same value as in fake passwd file:
HOME=$(abs_builddir)/root
Related dbus bug:
https://bugs.freedesktop.org/show_bug.cgi?id=101960
Resolves:
https://pagure.io/SSSD/sssd/issue/3531
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
1f331476e7d33bb03cc35a2a9064ee1cc5bed6cf |
|
22-Sep-2017 |
Sumit Bose <sbose@redhat.com> |
sssd_client: add mutex protected call to the PAC responder
SSSD's plugin for MIT Kerberos to send the PAC to the PAC responder
currently uses sss_pac_make_request() which does not protect the
communication with the PAC responder with a mutex as e.g. the NSS and
PAM clients.
If an application using threads loads this plugin via libkrb5 in
different threads and is heavily processing Kerberos tickets with PACs
chances are that two threads try to communicate with SSSD at once. In
this case one of the threads will miss a reply and will wait for it
until the default client timeout of 300s is passed.
This patch adds a call which uses a mutex to protect the communication
which will avoid the 300s delay mentioned above.
Resolves:
https://pagure.io/SSSD/sssd/issue/3518
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
53a4219e2f51cd0443931aa931505bf0b4bf5a45 |
|
27-Jul-2017 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
INTG: Add session recording tests
Add basic tests for all base combinations of session recording
configuration options.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
f75ba99fc8dd64e45af2f642d9fb7660860fd28f |
|
29-Mar-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Remove bashism from intgcheck-prepare
env variable UID is not defined in all shells (eg. dash)
We also need to move invocation of "id -u" before nss_wraper
is enabled otherwise we would get root instead of real user.
=================================== FAILURES ===================================
________________________ test_kcm_mem_init_list_destroy ________________________
Traceback (most recent call last):
File "/home/build/sssd/src/tests/intg/test_kcm.py", line 198, in test_kcm_mem_init_list_destroy
kcm_init_list_destroy(testenv)
File "/home/build/sssd/src/tests/intg/test_kcm.py", line 183, in kcm_init_list_destroy
exp_ccname = testenv.ccname()
File "/home/build/sssd/src/tests/intg/test_kcm.py", line 45, in ccname
my_uid = self.my_uid()
File "/home/build/sssd/src/tests/intg/test_kcm.py", line 41, in my_uid
return int(s_myuid)
ValueError: invalid literal for int() with base 10: ''
And we already use different approach in top level Makefile.am
3488) $(INTGCHECK_CONFIGURE_FLAGS) \
3489) CFLAGS="$$CFLAGS $(AM_CFLAGS) -DKCM_PEER_UID=$$(id -u)"; \
3490) $(MAKE) $(AM_MAKEFLAGS) ; \
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
0700118d8388c38b8cb28279510b206b76a3a411 |
|
27-Mar-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add integration tests for the KCM responder
Reviewed-by: Michal Židek <mzidek@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
91b0592cdab22915dff27ceae6d8e49c608aea4a |
|
14-Mar-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: test the curl wrapper with a command-line tool
In order to test the curl integration code, this patch adds a
command-line tool and tests that it's possible to drive a conversation
with the secrets responder using the tool.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
8bdb8c0970dc9acb5b0a54dab0bae306ca964944 |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add files provider integration tests
Implements integration tests for the files provider. In order to change
entries in the nss-wrapped passwd and group files, this commit also
implements a helper module that creates a new passwd and group file and
moves it in place of the nss-wrapped files. We move the files instead of
modifying them in-place in order to trigger similar inotify
notifications as shadow-utils would.
The unit test uses sleep on several places. This is suboptimal, but
during testing especially on slow machines, it became apparent that
sometimes the inotify message arrives later than the test would check
for the changed entries. Therefore, the check would query the NSS
responder even before the sss-files domain was invalidated.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
3728db53ac32da51fcaae96b132e8e56ebbaebfa |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add a module to call nss_sss's getgr* from tests
Implements a python module that allows to load the nss_sss module and
call functions that act like getgr*
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
8578fba1500d43ad9632784462c255bf8bb360fe |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add a module to call nss_sss's getpw* from tests
Implements a python module that allows to load the nss_sss module and
simulate calling getpw* functions from tests.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
1921d739ff7b028baa591272cc8969e330c8f872 |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: add a helper module with shared NSS constants
Every module that reads the sssd_nss module directly copied around the
same definition of NSS constants. This commit moves them into a single
file to avoid code duplication.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
4e17c050dac8f2c6e2d278c4c4a27001c8d7d164 |
|
15-Feb-2017 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: move helper fixtures to back up and restore a file to a utility module
The fixtures will be useful for tests that set up and restore a user and
group database. While it would be possible to import them already, the
functions were previously used in a test and importing from a test seems
a bit like a hack.
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
35ecfab87a24031e55798b22975e02832ee0f2ad |
|
15-Dec-2016 |
Michal Židek <mzidek@redhat.com> |
tests: sssctl user/group-show basic tests
Add basic tests for sssctl user/group-show commands. This includes
regression test for ticket #3235.
Resolves:
https://fedorahosted.org/sssd/ticket/3235
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
db0982c52294ee5ea08ed242d27660783fde29cd |
|
20-Sep-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add integration tests for the sssd-secrets
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> |
05457ed0e399aaacc919b7aacee5d8210e1c1072 |
|
24-Aug-2016 |
Petr Cech <pcech@redhat.com> |
INTG: Tests for ldap nested netgroups
This patch adds tests on reproducer of t2841.
Resolves:
https://fedorahosted.org/sssd/ticket/2841
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
49a5412cbc98e630de17359c29cb8d6ce0e16168 |
|
18-Aug-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: create ldap test without enumeration
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
1f4dc2971bac4ceb0803b18f86a746656a0f1990 |
|
18-Aug-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: rename test with enumeration
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b4633e73067d7bf3b0dbaf212569c123de88f306 |
|
10-Aug-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg: Allow to test netgroups
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> |
b8946a5dbde01a87465de707092716349a35248b |
|
23-Jun-2016 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add an integration test for the timestamps cache
Reviewed-by: Sumit Bose <sbose@redhat.com> |
8d1dcb6af723f2968410c4b088d06d63d02b4fea |
|
14-Nov-2015 |
Pavel Reichl <preichl@redhat.com> |
intg: Add test for user and group local overrides
Introduce a new integration test for local view overrides.
Regression tests for: #2790, #2757 and #2802.
Resolves:
https://fedorahosted.org/sssd/ticket/2732
Reviewed-by: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
586f512ab8b6e5a03349598846141f43c1d505b8 |
|
04-Nov-2015 |
Michal Židek <mzidek@redhat.com> |
tests: Regression test with wrong LC_ALL
Ticket:
https://fedorahosted.org/sssd/ticket/2785
Test local domain tool with wrong LC_ALL
environment variable value.
NOTE: The memory cache files are not deleted
properly in the test teardown to work around the
problem described in ticket
https://fedorahosted.org/sssd/ticket/2726
Once the ticket above is solved, the teardown
will be updated to remove the memory cache
files.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
a2c10cf31d14bac598f5cd008973375c3f9575a6 |
|
05-Aug-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg_test: Add integration test for memory cache
Reviewed-by: Michal Židek <mzidek@redhat.com> |
38b07019861240cf5107f5d51fc0027519e21619 |
|
05-Aug-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
intg_test: Add module for simulation of utility id
Reviewed-by: Michal Židek <mzidek@redhat.com> |
9d453f1e8b28983b363b44c49b7cd701a994fd97 |
|
28-May-2015 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Add integration tests
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> |