#3852 Unit tests fail after ipa-adtrust-install is run
Closed: Fixed None Opened 7 years ago by akrivoka.

After running ``ipa-adtrust-install on IPA server, some unit tests are failing due to missing attributes and objectclasses.

E.g:

[akrivoka@vm-180 freeipa]$ ./make-test ipatests/test_xmlrpc/test_replace.py
/usr/bin/nosetests -v --with-doctest --doctest-tests --exclude=plugins ipatests/test_xmlrpc/test_replace.py
test_replace pre-cleanup[0]: ('user_del', [u'tuser1'], {}) ... ok
test_replace[0]: user_add: Create u'tuser1' with 2 e-mail accounts ... ok
test_replace[1]: user_mod: Drop one e-mail account, add another to u'tuser1' ... ok
test_replace[2]: user_mod: Set mail to a new single value u'tuser1' ... ok
test_replace[3]: user_mod: Set mail to three new values u'tuser1' ... ok
test_replace[4]: user_mod: Remove all mail values u'tuser1' ... ok
test_replace[5]: user_mod: Ensure single-value mods work too, replace initials u'tuser1' ... ok
test_replace[6]: user_mod: Drop a single-value attribute u'tuser1' ... ok
test_replace post-cleanup[0]: ('user_del', [u'tuser1'], {}) ... ok

----------------------------------------------------------------------
Ran 9 tests in 1.501s

OK
======================================================================
passed under '/usr/bin/python2.7'

** pass **
[akrivoka@vm-180 freeipa]$ sudo ipa-adtrust-install 
<snip> (ipa-adtrust-install runs successfully)


[akrivoka@vm-128 freeipa]$ ./make-test ipatests/test_xmlrpc/test_replace.py
/usr/bin/nosetests -v --with-doctest --doctest-tests --exclude=plugins ipatests/test_xmlrpc/test_replace.py
test_replace pre-cleanup[0]: ('user_del', [u'tuser1'], {}) ... ok
test_replace[0]: user_add: Create u'tuser1' with 2 e-mail accounts ... FAIL
test_replace[1]: user_mod: Drop one e-mail account, add another to u'tuser1' ... ok
test_replace[2]: user_mod: Set mail to a new single value u'tuser1' ... ok
test_replace[3]: user_mod: Set mail to three new values u'tuser1' ... ok
test_replace[4]: user_mod: Remove all mail values u'tuser1' ... ok
test_replace[5]: user_mod: Ensure single-value mods work too, replace initials u'tuser1' ... ok
test_replace[6]: user_mod: Drop a single-value attribute u'tuser1' ... ok
test_replace post-cleanup[0]: ('user_del', [u'tuser1'], {}) ... ok

======================================================================
FAIL: test_replace[0]: user_add: Create u'tuser1' with 2 e-mail accounts
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/akrivoka/freeipa/ipatests/test_xmlrpc/xmlrpc_test.py", line 271, in <lambda>
    func = lambda: self.check(nice, **test)
  File "/home/akrivoka/freeipa/ipatests/test_xmlrpc/xmlrpc_test.py", line 289, in check
    self.check_output(nice, cmd, args, options, expected, extra_check)
  File "/home/akrivoka/freeipa/ipatests/test_xmlrpc/xmlrpc_test.py", line 327, in check_output
    assert_deepequal(expected, got, nice)
  File "/home/akrivoka/freeipa/ipatests/util.py", line 344, in assert_deepequal
    assert_deepequal(e_sub, g_sub, doc, stack + (key,))
  File "/home/akrivoka/freeipa/ipatests/util.py", line 338, in assert_deepequal
    doc, sorted(missing), sorted(extra), expected, got, stack
AssertionError: assert_deepequal: dict keys mismatch.
  test_replace[0]: user_add: Create u'tuser1' with 2 e-mail accounts
  missing keys = []
  extra keys = ['ipantsecurityidentifier']
  expected = {'dn': ipapython.dn.DN('uid=tuser1,cn=users,cn=accounts,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com'), 'has_keytab': False, 'displayname': [u'Test User1'], 'cn': [u'Test User1'], 'mepmanagedentry': [ipapython.dn.DN('cn=tuser1,cn=groups,cn=accounts,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com')], 'memberof_group': [u'ipausers'], 'has_password': False, 'ipauniqueid': [Fuzzy('^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$', <type 'unicode'>, None)], 'homedirectory': [u'/home/tuser1'], 'krbpwdpolicyreference': [ipapython.dn.DN('cn=global_policy,cn=IDM.LAB.ENG.BRQ.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com')], 'krbprincipalname': [u'tuser1@IDM.LAB.ENG.BRQ.REDHAT.COM'], 'givenname': [u'Test'], 'uid': [u'tuser1'], 'objectclass': [u'top', u'person', u'organizationalperson', u'inetorgperson', u'inetuser', u'posixaccount', u'krbprincipalaux', u'krbticketpolicyaux', u'ipaobject', u'ipasshuser', u'ipaSshGroupOfPubKeys', u'mepOriginEntry'], 'loginshell': [u'/bin/sh'], 'uidnumber': [Fuzzy('^\\d+$', <type 'basestring'>, None)], 'gidnumber': [Fuzzy('^\\d+$', <type 'basestring'>, None)], 'gecos': [u'Test User1'], 'sn': [u'User1'], 'mail': [u'test1@example.com', u'test2@example.com'], 'initials': [u'TU']}
  got = {'memberof_group': (u'ipausers',), 'uid': (u'tuser1',), 'has_keytab': False, 'has_password': False, 'homedirectory': (u'/home/tuser1',), 'cn': (u'Test User1',), 'loginshell': (u'/bin/sh',), 'uidnumber': (u'1613000991',), 'mail': (u'test1@example.com', u'test2@example.com'), 'dn': u'uid=tuser1,cn=users,cn=accounts,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com', 'displayname': (u'Test User1',), 'mepmanagedentry': (u'cn=tuser1,cn=groups,cn=accounts,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com',), 'ipauniqueid': (u'd5f5b068-0031-11e3-899c-001a4a2221fd',), 'krbpwdpolicyreference': (u'cn=global_policy,cn=IDM.LAB.ENG.BRQ.REDHAT.COM,cn=kerberos,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com',), 'krbprincipalname': (u'tuser1@IDM.LAB.ENG.BRQ.REDHAT.COM',), 'givenname': (u'Test',), 'objectclass': (u'top', u'person', u'organizationalperson', u'inetorgperson', u'inetuser', u'posixaccount', u'krbprincipalaux', u'krbticketpolicyaux', u'ipaobject', u'ipasshuser', u'ipaSshGroupOfPubKeys', u'mepOriginEntry', u'ipantuserattrs'), 'ipantsecurityidentifier': (u'S-1-5-21-393067437-1319522657-3189500613-1991',), 'gidnumber': (u'1613000991',), 'gecos': (u'Test User1',), 'sn': (u'User1',), 'initials': (u'TU',)}
  path = ('result',)

----------------------------------------------------------------------
Ran 9 tests in 1.668s

FAILED (failures=1)
======================================================================
FAILED under '/usr/bin/python2.7'

** FAIL **

Metadata Update from @akrivoka:
- Issue assigned to akrivoka
- Issue set to the milestone: FreeIPA 3.3.x - 2013/08 (bug fixing)

4 years ago

Login to comment on this ticket.

Metadata