[SSSD] [PATCH] intg: Add more LDAP tests

Nikolai Kondrashov Nikolai.Kondrashov at redhat.com
Wed Sep 30 15:15:52 UTC 2015


Hi everyone,

Here is a patch set fixing some things in integration tests and adding more
LDAP tests:

     * Adding/removing a user/group/membership with rfc2307(bis) schema.
     * Filtering users/groups 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.

These are pretty basic, but I think they're good for the start.
Suggestions for more tests are welcome :)

NOTE: These still break test_memory_cache.py as seen in the attached log file.
       We need to figure out why and do something with it. Otherwise, the
       tests work fine.

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-intg-Get-base-DN-from-LDAP-connection-object.patch
Type: text/x-patch
Size: 2690 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-intg-Remove-_rfc2307-from-function-names.patch
Type: text/x-patch
Size: 12933 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-intg-Add-support-for-specifying-all-user-attrs.patch
Type: text/x-patch
Size: 2777 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-intg-Split-LDAP-test-fixtures-for-flexibility.patch
Type: text/x-patch
Size: 5092 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-intg-Reduce-sssd.conf-duplication-in-test_ldap.py.patch
Type: text/x-patch
Size: 6609 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-intg-Fix-RFC2307bis-group-member-creation.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-intg-Add-more-LDAP-tests.patch
Type: text/x-patch
Size: 21848 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150930/86ad66a1/attachment-0013.bin>
-------------- next part --------------
____________________________________________________________________________________________________________________________________________________ test_getpwnam_with_mc ____________________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 297, in test_getpwnam_with_mc
    test_getpwnam(ldap_conn, sanity_rfc2307)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 215, in test_getpwnam
    gecos='1001', shell='/bin/bash'))
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/ent.py", line 218, in assert_passwd_by_name
    assert False, err
AssertionError: 'getpwnam(): name not found: user1'
________________________________________________________________________________________________________________________________________________ test_getgrnam_simple_with_mc _________________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 323, in test_getgrnam_simple_with_mc
    test_getgrnam_simple(ldap_conn, sanity_rfc2307)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 301, in test_getgrnam_simple
    ent.assert_group_by_name("group1", dict(name="group1", gid=2001))
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/ent.py", line 378, in assert_group_by_name
    assert False, err
AssertionError: 'getgrnam(): name not found: group1'
______________________________________________________________________________________________________________________________________________ test_getgrnam_membership_with_mc _______________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 373, in test_getgrnam_membership_with_mc
    test_getgrnam_membership(ldap_conn, sanity_rfc2307)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 329, in test_getgrnam_membership
    dict(mem=ent.contains_only("user1", "user11", "user21")))
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/ent.py", line 378, in assert_group_by_name
    assert False, err
AssertionError: 'getgrnam(): name not found: group1'
___________________________________________________________________________________________________________________________________________________ test_initgroups_with_mc ___________________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 405, in test_initgroups_with_mc
    test_initgroups(ldap_conn, sanity_rfc2307)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 389, in test_initgroups
    assert_user_gids_equal('user1', [2000, 2001])
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 377, in assert_user_gids_equal
    (res, errno, gids) = sssd_id.get_user_gids(user)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/sssd_id.py", line 91, in get_user_gids
    pwd_user = pwd.getpwnam(user)
KeyError: 'getpwnam(): name not found: user1'
_______________________________________________________________________________________________________________________________________________ test_initgroups_fqname_with_mc ________________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 411, in test_initgroups_fqname_with_mc
    assert_user_gids_equal('user1 at LDAP', [2000, 2001])
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 377, in assert_user_gids_equal
    (res, errno, gids) = sssd_id.get_user_gids(user)
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/sssd_id.py", line 91, in get_user_gids
    pwd_user = pwd.getpwnam(user)
KeyError: 'getpwnam(): name not found: user1 at LDAP'
_________________________________________________________________________________________________________________________________________ test_invalidation_of_gids_after_initgroups __________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 526, in test_invalidation_of_gids_after_initgroups
    gecos='1001', shell='/bin/bash'))
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/ent.py", line 218, in assert_passwd_by_name
    assert False, err
AssertionError: 'getpwnam(): name not found: user1'
________________________________________________________________________________________________________________________________________ test_initgroups_without_change_in_membership _________________________________________________________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 570, in test_initgroups_without_change_in_membership
    run_simple_test_with_initgroups()
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/test_memory_cache.py", line 489, in run_simple_test_with_initgroups
    gecos='1001', shell='/bin/bash'))
  File "/home/nkondras/projects/fedorahosted.org/sssd/src/tests/intg/ent.py", line 218, in assert_passwd_by_name
    assert False, err
AssertionError: 'getpwnam(): name not found: user1'


More information about the sssd-devel mailing list