The user_show command does not always order the memberof_group field in the same way. This makes some tests to fail, as can be seen in [1], [2] and [3].
user_show
memberof_group
Call the command twice, on the second time the order is different. 1. ipa console 2. api.Command[u'user_show'](u'admin') output: 'memberof_group': ('trust admins', 'admins') 3. api.Command[u'user_show'](u'admin') output: 'memberof_group': ('admins', 'trust admins')
ipa console
api.Command[u'user_show'](u'admin')
'memberof_group': ('trust admins', 'admins')
'memberof_group': ('admins', 'trust admins')
[root@vm-228 ~]# ipa console (Custom IPA interactive Python console) >>> api.Command[u'user_show'](u'admin') {'result': {'uid': ('admin',), 'sn': ('Administrator',), 'homedirectory': ('/home/admin',), 'krbprincipalname': ('admin@DOM-228.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM',), 'loginshell': ('/bin/bash',), 'nsaccountlock': False, 'gidnumber': ('436400000',), 'uidnumber': ('436400000',), 'has_password': True, 'has_keytab': True, 'memberof_group': ('trust admins', 'admins'), 'dn': 'uid=admin,cn=users,cn=accounts,dc=dom-228,dc=abc,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com'}, 'value': 'admin', 'summary': None} >>> api.Command[u'user_show'](u'admin') {'result': {'krbprincipalname': ('admin@DOM-228.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM',), 'uidnumber': ('436400000',), 'sn': ('Administrator',), 'uid': ('admin',), 'nsaccountlock': False, 'loginshell': ('/bin/bash',), 'homedirectory': ('/home/admin',), 'gidnumber': ('436400000',), 'has_password': True, 'has_keytab': True, 'memberof_group': ('admins', 'trust admins'), 'dn': 'uid=admin,cn=users,cn=accounts,dc=dom-228,dc=abc,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com'}, 'value': 'admin', 'summary': None}
When a third group is added the behavior is still the same: Calling it for the first time: 'trust admins', 'admins', 'new_group1' Calling it for the second time: 'admins', 'trust admins', 'new_group1'
The output should always be the same
Git master (last commit: 9400a40)
[1] https://fedorapeople.org/groups/freeipa/prci/jobs/d5d3918e-ec15-11e7-8db5-001a4a23169d/ [2] https://fedorapeople.org/groups/freeipa/prci/jobs/1fbae218-ec19-11e7-9efa-001a4a2316a0/ [3] https://fedorapeople.org/groups/freeipa/prci/jobs/c84fe0b6-ec16-11e7-ad57-001a4a2316a4/
Metadata Update from @fbarreto: - Issue tagged with: bug, test-failure
Closing this as invalid, the tests should not rely on any ordered data. Instead of having this ticket, the ticket https://pagure.io/freeipa/issue/7339 will track the effort related to fixing the tests.
Metadata Update from @fbarreto: - Issue close_status updated to: invalid - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.