With IPA 4.9.8 test_xmlrpc/test_user_plugin.py became very racy. In a couple of days I have different failures:
test_xmlrpc/test_user_plugin.py
[2021-12-13 15:41:53] =================================== FAILURES =================================== [2021-12-13 15:41:53] _________ TestUserWithUPGDisabled.test_create_without_upg_with_gid_set _________ [2021-12-13 15:41:53] [2021-12-13 15:41:53] self = <ipatests.test_xmlrpc.test_user_plugin.TestUserWithUPGDisabled object at 0x7f561c7d07f0> [2021-12-13 15:41:53] [2021-12-13 15:41:53] def test_create_without_upg_with_gid_set(self): [2021-12-13 15:41:53] """ Create user without User's Primary GID with GID set [2021-12-13 15:41:53] [2021-12-13 15:41:53] The UPG plugin is disabled, but the user is provided with a group [2021-12-13 15:41:53] """ [2021-12-13 15:41:53] testuser = UserTracker( [2021-12-13 15:41:53] name=u'tuser1', givenname=u'Test', sn=u'Tuser1', [2021-12-13 15:41:53] gidnumber=1000 [2021-12-13 15:41:53] ) [2021-12-13 15:41:53] testuser.track_create() [2021-12-13 15:41:53] del testuser.attrs['mepmanagedentry'] [2021-12-13 15:41:53] testuser.attrs.update(gidnumber=[u'1000']) [2021-12-13 15:41:53] testuser.attrs.update( [2021-12-13 15:41:53] description=[], [2021-12-13 15:41:53] objectclass=objectclasses.user_base + [u'ipantuserattrs'], [2021-12-13 15:41:53] ) [2021-12-13 15:41:53] command = testuser.make_create_command() [2021-12-13 15:41:53] result = command() [2021-12-13 15:41:53] > testuser.check_create(result, [u'description']) [2021-12-13 15:41:53] [2021-12-13 15:41:53] test_xmlrpc/test_user_plugin.py:848: [2021-12-13 15:41:53] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-13 15:41:53] test_xmlrpc/tracker/user_plugin.py:266: in check_create [2021-12-13 15:41:53] assert_deepequal(dict( [2021-12-13 15:41:53] util.py:436: in assert_deepequal [2021-12-13 15:41:53] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-13 15:41:53] util.py:436: in assert_deepequal [2021-12-13 15:41:53] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-13 15:41:53] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-13 15:41:53] [2021-12-13 15:41:53] expected = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-13 15:41:53] got = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-13 15:41:53] doc = '', stack = ('result', 'objectclass') [2021-12-13 15:41:53] [2021-12-13 15:41:53] def assert_deepequal(expected, got, doc='', stack=tuple()): [2021-12-13 15:41:53] """ [2021-12-13 15:41:53] Recursively check for type and equality. [2021-12-13 15:41:53] [2021-12-13 15:41:53] If a value in expected is callable then it will used as a callback to [2021-12-13 15:41:53] test for equality on the got value. The callback is passed the got [2021-12-13 15:41:53] value and returns True if equal, False otherwise. [2021-12-13 15:41:53] [2021-12-13 15:41:53] If the tests fails, it will raise an ``AssertionError`` with detailed [2021-12-13 15:41:53] information, including the path to the offending value. For example: [2021-12-13 15:41:53] [2021-12-13 15:41:53] >>> expected = [u'Hello', dict(world=1)] [2021-12-13 15:41:53] >>> got = [u'Hello', dict(world=1.0)] [2021-12-13 15:41:53] >>> expected == got [2021-12-13 15:41:53] True [2021-12-13 15:41:53] >>> assert_deepequal( [2021-12-13 15:41:53] ... expected, got, doc='Testing my nested data') # doctest: +ELLIPSIS [2021-12-13 15:41:53] Traceback (most recent call last): [2021-12-13 15:41:53] ... [2021-12-13 15:41:53] AssertionError: assert_deepequal: type(expected) is not type(got). [2021-12-13 15:41:53] Testing my nested data [2021-12-13 15:41:53] type(expected) = <... 'int'> [2021-12-13 15:41:53] type(got) = <... 'float'> [2021-12-13 15:41:53] expected = 1 [2021-12-13 15:41:53] got = 1.0 [2021-12-13 15:41:53] path = (..., 'world') [2021-12-13 15:41:53] [2021-12-13 15:41:53] Note that lists and tuples are considered equivalent, and the order of [2021-12-13 15:41:53] their elements does not matter. [2021-12-13 15:41:53] """ [2021-12-13 15:41:53] if PRETTY_PRINT: [2021-12-13 15:41:53] expected_str = struct_to_string(expected, EXPECTED_LEN) [2021-12-13 15:41:53] got_str = struct_to_string(got, GOT_LEN) [2021-12-13 15:41:53] else: [2021-12-13 15:41:53] expected_str = repr(expected) [2021-12-13 15:41:53] got_str = repr(got) [2021-12-13 15:41:53] [2021-12-13 15:41:53] if isinstance(expected, tuple): [2021-12-13 15:41:53] expected = list(expected) [2021-12-13 15:41:53] if isinstance(got, tuple): [2021-12-13 15:41:53] got = list(got) [2021-12-13 15:41:53] if isinstance(expected, DN): [2021-12-13 15:41:53] if isinstance(got, str): [2021-12-13 15:41:53] got = DN(got) [2021-12-13 15:41:53] if ( [2021-12-13 15:41:53] not (isinstance(expected, Fuzzy) [2021-12-13 15:41:53] or callable(expected) [2021-12-13 15:41:53] or type(expected) is type(got)) [2021-12-13 15:41:53] ): [2021-12-13 15:41:53] raise AssertionError( [2021-12-13 15:41:53] TYPE % (doc, type(expected), type(got), expected, got, stack) [2021-12-13 15:41:53] ) [2021-12-13 15:41:53] if isinstance(expected, (list, tuple)): [2021-12-13 15:41:53] if len(expected) != len(got): [2021-12-13 15:41:53] > raise AssertionError( [2021-12-13 15:41:53] LEN % (doc, len(expected), len(got), expected_str, got_str, [2021-12-13 15:41:53] stack) [2021-12-13 15:41:53] ) [2021-12-13 15:41:53] E AssertionError: assert_deepequal: list length mismatch. [2021-12-13 15:41:53] E [2021-12-13 15:41:53] E len(expected) = 12 [2021-12-13 15:41:53] E len(got) = 11 [2021-12-13 15:41:53] E expected = ['top', [2021-12-13 15:41:53] E 'person', [2021-12-13 15:41:53] E 'organizationalperson', [2021-12-13 15:41:53] E 'inetorgperson', [2021-12-13 15:41:53] E 'inetuser', [2021-12-13 15:41:53] E 'posixaccount', [2021-12-13 15:41:53] E 'krbprincipalaux', [2021-12-13 15:41:53] E 'krbticketpolicyaux', [2021-12-13 15:41:53] E 'ipaobject', [2021-12-13 15:41:53] E 'ipasshuser', [2021-12-13 15:41:53] E 'ipaSshGroupOfPubKeys', [2021-12-13 15:41:53] E 'ipantuserattrs'] [2021-12-13 15:41:53] E got = ('top', [2021-12-13 15:41:53] E 'person', [2021-12-13 15:41:53] E 'organizationalperson', [2021-12-13 15:41:53] E 'inetorgperson', [2021-12-13 15:41:53] E 'inetuser', [2021-12-13 15:41:53] E 'posixaccount', [2021-12-13 15:41:53] E 'krbprincipalaux', [2021-12-13 15:41:53] E 'krbticketpolicyaux', [2021-12-13 15:41:53] E 'ipaobject', [2021-12-13 15:41:53] E 'ipasshuser', [2021-12-13 15:41:53] E 'ipaSshGroupOfPubKeys') [2021-12-13 15:41:53] E path = ('result', 'objectclass') [2021-12-13 15:41:53] [2021-12-13 15:41:53] util.py:405: AssertionError
[2021-12-11 04:57:42] =================================== FAILURES =================================== [2021-12-11 04:57:42] ________________________ TestUser.test_remove_userclass ________________________ [2021-12-11 04:57:42] [2021-12-11 04:57:42] self = <ipatests.test_xmlrpc.test_user_plugin.TestUser object at 0x7feef072dd00> [2021-12-11 04:57:42] user = <ipatests.test_xmlrpc.tracker.user_plugin.UserTracker object at 0x7feef070a880> [2021-12-11 04:57:42] [2021-12-11 04:57:42] def test_remove_userclass(self, user): [2021-12-11 04:57:42] """ Remove attribute userclass from user entry """ [2021-12-11 04:57:42] user.ensure_exists() [2021-12-11 04:57:42] > result = user.run_command( [2021-12-11 04:57:42] 'user_mod', user.uid, **dict(userclass=u'') [2021-12-11 04:57:42] ) [2021-12-11 04:57:42] [2021-12-11 04:57:42] test_xmlrpc/test_user_plugin.py:236: [2021-12-11 04:57:42] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-11 04:57:42] test_xmlrpc/tracker/base.py:71: in run_command [2021-12-11 04:57:42] result = cmd(*args, **options) [2021-12-11 04:57:42] ../ipalib/frontend.py:471: in __call__ [2021-12-11 04:57:42] return self.__do_call(*args, **options) [2021-12-11 04:57:42] ../ipalib/frontend.py:499: in __do_call [2021-12-11 04:57:42] ret = self.run(*args, **options) [2021-12-11 04:57:42] ../ipalib/frontend.py:822: in run [2021-12-11 04:57:42] return self.forward(*args, **options) [2021-12-11 04:57:42] ../ipalib/frontend.py:844: in forward [2021-12-11 04:57:42] return self.Backend.rpcclient.forward(self.forwarded_name, [2021-12-11 04:57:42] ../ipalib/rpc.py:1151: in forward [2021-12-11 04:57:42] return self._call_command(command, params) [2021-12-11 04:57:42] ../ipalib/rpc.py:1127: in _call_command [2021-12-11 04:57:42] return command(*params) [2021-12-11 04:57:42] ../ipalib/rpc.py:1281: in _call [2021-12-11 04:57:42] return self.__request(name, args) [2021-12-11 04:57:42] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-11 04:57:42] [2021-12-11 04:57:42] self = <ipalib.rpc.JSONServerProxy object at 0x7feef070aee0> [2021-12-11 04:57:42] name = 'user_mod/1' [2021-12-11 04:57:42] args = (('user1',), {'userclass': None, 'version': '2.245'}) [2021-12-11 04:57:42] [2021-12-11 04:57:42] def __request(self, name, args): [2021-12-11 04:57:42] print_json = self.__verbose >= 2 [2021-12-11 04:57:42] payload = {'method': unicode(name), 'params': args, 'id': 0} [2021-12-11 04:57:42] version = args[1].get('version', VERSION_WITHOUT_CAPABILITIES) [2021-12-11 04:57:42] payload = json_encode_binary( [2021-12-11 04:57:42] payload, version, pretty_print=print_json) [2021-12-11 04:57:42] [2021-12-11 04:57:42] if print_json: [2021-12-11 04:57:42] logger.info( [2021-12-11 04:57:42] 'Request: %s', [2021-12-11 04:57:42] payload [2021-12-11 04:57:42] ) [2021-12-11 04:57:42] [2021-12-11 04:57:42] response = self.__transport.request( [2021-12-11 04:57:42] self.__host, [2021-12-11 04:57:42] self.__handler, [2021-12-11 04:57:42] payload.encode('utf-8'), [2021-12-11 04:57:42] verbose=self.__verbose >= 3, [2021-12-11 04:57:42] ) [2021-12-11 04:57:42] [2021-12-11 04:57:42] if print_json: [2021-12-11 04:57:42] logger.info( [2021-12-11 04:57:42] 'Response: %s', [2021-12-11 04:57:42] json.dumps(json.loads(response), sort_keys=True, indent=4) [2021-12-11 04:57:42] ) [2021-12-11 04:57:42] [2021-12-11 04:57:42] try: [2021-12-11 04:57:42] response = json_decode_binary(response) [2021-12-11 04:57:42] except ValueError as e: [2021-12-11 04:57:42] raise JSONError(error=str(e)) [2021-12-11 04:57:42] [2021-12-11 04:57:42] error = response.get('error') [2021-12-11 04:57:42] if error: [2021-12-11 04:57:42] try: [2021-12-11 04:57:42] error_class = errors_by_code[error['code']] [2021-12-11 04:57:42] except KeyError: [2021-12-11 04:57:42] raise UnknownError( [2021-12-11 04:57:42] code=error.get('code'), [2021-12-11 04:57:42] error=error.get('message'), [2021-12-11 04:57:42] server=self.__host, [2021-12-11 04:57:42] ) [2021-12-11 04:57:42] else: [2021-12-11 04:57:42] kw = error.get('data', {}) [2021-12-11 04:57:42] kw['message'] = error['message'] [2021-12-11 04:57:42] > raise error_class(**kw) [2021-12-11 04:57:42] E ipalib.errors.ObjectclassViolation: attribute "ipaNTSecurityIdentifier" not allowed [2021-12-11 04:57:42] [2021-12-11 04:57:42] ../ipalib/rpc.py:1275: ObjectclassViolation
[2021-12-10 11:03:14] =================================== FAILURES =================================== [2021-12-10 11:03:14] _________________ TestCreate.test_create_with_radius_username __________________ [2021-12-10 11:03:14] [2021-12-10 11:03:14] self = <ipatests.test_xmlrpc.test_user_plugin.TestCreate object at 0x7fb0f691acd0> [2021-12-10 11:03:14] user_radius = <ipatests.test_xmlrpc.tracker.user_plugin.UserTracker object at 0x7fb0f691a8e0> [2021-12-10 11:03:14] [2021-12-10 11:03:14] def test_create_with_radius_username(self, user_radius): [2021-12-10 11:03:14] """Test for issue 7569: try to create a user with --radius-username""" [2021-12-10 11:03:14] command = user_radius.make_create_command() [2021-12-10 11:03:14] result = command() [2021-12-10 11:03:14] > user_radius.check_create(result) [2021-12-10 11:03:14] [2021-12-10 11:03:14] test_xmlrpc/test_user_plugin.py:734: [2021-12-10 11:03:14] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-10 11:03:14] test_xmlrpc/tracker/user_plugin.py:266: in check_create [2021-12-10 11:03:14] assert_deepequal(dict( [2021-12-10 11:03:14] util.py:436: in assert_deepequal [2021-12-10 11:03:14] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-10 11:03:14] util.py:436: in assert_deepequal [2021-12-10 11:03:14] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-10 11:03:14] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-10 11:03:14] [2021-12-10 11:03:14] expected = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-10 11:03:14] got = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-10 11:03:14] doc = '', stack = ('result', 'objectclass') [2021-12-10 11:03:14] [2021-12-10 11:03:14] def assert_deepequal(expected, got, doc='', stack=tuple()): [2021-12-10 11:03:14] """ [2021-12-10 11:03:14] Recursively check for type and equality. [2021-12-10 11:03:14] [2021-12-10 11:03:14] If a value in expected is callable then it will used as a callback to [2021-12-10 11:03:14] test for equality on the got value. The callback is passed the got [2021-12-10 11:03:14] value and returns True if equal, False otherwise. [2021-12-10 11:03:14] [2021-12-10 11:03:14] If the tests fails, it will raise an ``AssertionError`` with detailed [2021-12-10 11:03:14] information, including the path to the offending value. For example: [2021-12-10 11:03:14] [2021-12-10 11:03:14] >>> expected = [u'Hello', dict(world=1)] [2021-12-10 11:03:14] >>> got = [u'Hello', dict(world=1.0)] [2021-12-10 11:03:14] >>> expected == got [2021-12-10 11:03:14] True [2021-12-10 11:03:14] >>> assert_deepequal( [2021-12-10 11:03:14] ... expected, got, doc='Testing my nested data') # doctest: +ELLIPSIS [2021-12-10 11:03:14] Traceback (most recent call last): [2021-12-10 11:03:14] ... [2021-12-10 11:03:14] AssertionError: assert_deepequal: type(expected) is not type(got). [2021-12-10 11:03:14] Testing my nested data [2021-12-10 11:03:14] type(expected) = <... 'int'> [2021-12-10 11:03:14] type(got) = <... 'float'> [2021-12-10 11:03:14] expected = 1 [2021-12-10 11:03:14] got = 1.0 [2021-12-10 11:03:14] path = (..., 'world') [2021-12-10 11:03:14] [2021-12-10 11:03:14] Note that lists and tuples are considered equivalent, and the order of [2021-12-10 11:03:14] their elements does not matter. [2021-12-10 11:03:14] """ [2021-12-10 11:03:14] if PRETTY_PRINT: [2021-12-10 11:03:14] expected_str = struct_to_string(expected, EXPECTED_LEN) [2021-12-10 11:03:14] got_str = struct_to_string(got, GOT_LEN) [2021-12-10 11:03:14] else: [2021-12-10 11:03:14] expected_str = repr(expected) [2021-12-10 11:03:14] got_str = repr(got) [2021-12-10 11:03:14] [2021-12-10 11:03:14] if isinstance(expected, tuple): [2021-12-10 11:03:14] expected = list(expected) [2021-12-10 11:03:14] if isinstance(got, tuple): [2021-12-10 11:03:14] got = list(got) [2021-12-10 11:03:14] if isinstance(expected, DN): [2021-12-10 11:03:14] if isinstance(got, str): [2021-12-10 11:03:14] got = DN(got) [2021-12-10 11:03:14] if ( [2021-12-10 11:03:14] not (isinstance(expected, Fuzzy) [2021-12-10 11:03:14] or callable(expected) [2021-12-10 11:03:14] or type(expected) is type(got)) [2021-12-10 11:03:14] ): [2021-12-10 11:03:14] raise AssertionError( [2021-12-10 11:03:14] TYPE % (doc, type(expected), type(got), expected, got, stack) [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] if isinstance(expected, (list, tuple)): [2021-12-10 11:03:14] if len(expected) != len(got): [2021-12-10 11:03:14] > raise AssertionError( [2021-12-10 11:03:14] LEN % (doc, len(expected), len(got), expected_str, got_str, [2021-12-10 11:03:14] stack) [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] E AssertionError: assert_deepequal: list length mismatch. [2021-12-10 11:03:14] E [2021-12-10 11:03:14] E len(expected) = 14 [2021-12-10 11:03:14] E len(got) = 13 [2021-12-10 11:03:14] E expected = ['top', [2021-12-10 11:03:14] E 'person', [2021-12-10 11:03:14] E 'organizationalperson', [2021-12-10 11:03:14] E 'inetorgperson', [2021-12-10 11:03:14] E 'inetuser', [2021-12-10 11:03:14] E 'posixaccount', [2021-12-10 11:03:14] E 'krbprincipalaux', [2021-12-10 11:03:14] E 'krbticketpolicyaux', [2021-12-10 11:03:14] E 'ipaobject', [2021-12-10 11:03:14] E 'ipasshuser', [2021-12-10 11:03:14] E 'ipaSshGroupOfPubKeys', [2021-12-10 11:03:14] E 'mepOriginEntry', [2021-12-10 11:03:14] E 'ipantuserattrs', [2021-12-10 11:03:14] E 'ipatokenradiusproxyuser'] [2021-12-10 11:03:14] E got = ('top', [2021-12-10 11:03:14] E 'person', [2021-12-10 11:03:14] E 'organizationalperson', [2021-12-10 11:03:14] E 'inetorgperson', [2021-12-10 11:03:14] E 'inetuser', [2021-12-10 11:03:14] E 'posixaccount', [2021-12-10 11:03:14] E 'krbprincipalaux', [2021-12-10 11:03:14] E 'krbticketpolicyaux', [2021-12-10 11:03:14] E 'ipaobject', [2021-12-10 11:03:14] E 'ipasshuser', [2021-12-10 11:03:14] E 'ipatokenradiusproxyuser', [2021-12-10 11:03:14] E 'ipaSshGroupOfPubKeys', [2021-12-10 11:03:14] E 'mepOriginEntry') [2021-12-10 11:03:14] E path = ('result', 'objectclass') [2021-12-10 11:03:14] [2021-12-10 11:03:14] util.py:405: AssertionError [2021-12-10 11:03:14] ---------------------------- Captured stdout setup ----------------------------- [2021-12-10 11:03:14] Ran command: ipaclient.plugins.user.user_del()('radiususer', no_preserve=True, preserve=False, version='2.245'): NotFound: radiususer: user not found [2021-12-10 11:03:14] ----------------------------- Captured stdout call ----------------------------- [2021-12-10 11:03:14] Ran command: ipaserver.plugins.user.user_add()('radiususer', givenname='radiususer', sn='radiususer1', ipatokenradiususername='radiususer', version='2.245'): OK [2021-12-10 11:03:14] --------------------------- Captured stdout teardown --------------------------- [2021-12-10 11:03:14] Ran command: ipaclient.plugins.user.user_del()('radiususer', no_preserve=True, preserve=False, version='2.245'): OK [2021-12-10 11:03:14] Ran command: ipaserver.plugins.group.group_del()('group1', version='2.245'): OK [2021-12-10 11:03:14] Ran command: ipaclient.plugins.user.user_del()('user1', no_preserve=True, preserve=False, version='2.245'): OK [2021-12-10 11:03:14] Ran command: ipaclient.plugins.user.user_del()('None', no_preserve=True, preserve=False, version='2.245'): OK [2021-12-10 11:03:14] ________ TestUserWithUPGDisabled.test_create_where_managed_group_exists ________ [2021-12-10 11:03:14] [2021-12-10 11:03:14] self = <ipatests.test_xmlrpc.test_user_plugin.TestUserWithUPGDisabled object at 0x7fb0f691a160> [2021-12-10 11:03:14] user = <ipatests.test_xmlrpc.tracker.user_plugin.UserTracker object at 0x7fb0f691a580> [2021-12-10 11:03:14] group = <ipatests.test_xmlrpc.tracker.group_plugin.GroupTracker object at 0x7fb0f6874490> [2021-12-10 11:03:14] [2021-12-10 11:03:14] def test_create_where_managed_group_exists(self, user, group): [2021-12-10 11:03:14] """ Create a managed group and then try to create user [2021-12-10 11:03:14] with the same name the group has [2021-12-10 11:03:14] [2021-12-10 11:03:14] As the UPG plugin is disabled, there is no conflict [2021-12-10 11:03:14] """ [2021-12-10 11:03:14] group.create() [2021-12-10 11:03:14] testuser = UserTracker( [2021-12-10 11:03:14] name=group.cn, givenname=u'Test', sn=u'Tuser1', [2021-12-10 11:03:14] gidnumber=1000 [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] testuser.track_create() [2021-12-10 11:03:14] del testuser.attrs['mepmanagedentry'] [2021-12-10 11:03:14] testuser.attrs.update(gidnumber=[u'1000']) [2021-12-10 11:03:14] testuser.attrs.update( [2021-12-10 11:03:14] description=[], [2021-12-10 11:03:14] objectclass=objectclasses.user_base + [u'ipantuserattrs'], [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] command = testuser.make_create_command() [2021-12-10 11:03:14] result = command() [2021-12-10 11:03:14] > testuser.check_create(result, [u'description']) [2021-12-10 11:03:14] [2021-12-10 11:03:14] test_xmlrpc/test_user_plugin.py:871: [2021-12-10 11:03:14] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-10 11:03:14] test_xmlrpc/tracker/user_plugin.py:266: in check_create [2021-12-10 11:03:14] assert_deepequal(dict( [2021-12-10 11:03:14] util.py:436: in assert_deepequal [2021-12-10 11:03:14] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-10 11:03:14] util.py:436: in assert_deepequal [2021-12-10 11:03:14] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-10 11:03:14] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-10 11:03:14] [2021-12-10 11:03:14] expected = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-10 11:03:14] got = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-10 11:03:14] doc = '', stack = ('result', 'objectclass') [2021-12-10 11:03:14] [2021-12-10 11:03:14] def assert_deepequal(expected, got, doc='', stack=tuple()): [2021-12-10 11:03:14] """ [2021-12-10 11:03:14] Recursively check for type and equality. [2021-12-10 11:03:14] [2021-12-10 11:03:14] If a value in expected is callable then it will used as a callback to [2021-12-10 11:03:14] test for equality on the got value. The callback is passed the got [2021-12-10 11:03:14] value and returns True if equal, False otherwise. [2021-12-10 11:03:14] [2021-12-10 11:03:14] If the tests fails, it will raise an ``AssertionError`` with detailed [2021-12-10 11:03:14] information, including the path to the offending value. For example: [2021-12-10 11:03:14] [2021-12-10 11:03:14] >>> expected = [u'Hello', dict(world=1)] [2021-12-10 11:03:14] >>> got = [u'Hello', dict(world=1.0)] [2021-12-10 11:03:14] >>> expected == got [2021-12-10 11:03:14] True [2021-12-10 11:03:14] >>> assert_deepequal( [2021-12-10 11:03:14] ... expected, got, doc='Testing my nested data') # doctest: +ELLIPSIS [2021-12-10 11:03:14] Traceback (most recent call last): [2021-12-10 11:03:14] ... [2021-12-10 11:03:14] AssertionError: assert_deepequal: type(expected) is not type(got). [2021-12-10 11:03:14] Testing my nested data [2021-12-10 11:03:14] type(expected) = <... 'int'> [2021-12-10 11:03:14] type(got) = <... 'float'> [2021-12-10 11:03:14] expected = 1 [2021-12-10 11:03:14] got = 1.0 [2021-12-10 11:03:14] path = (..., 'world') [2021-12-10 11:03:14] [2021-12-10 11:03:14] Note that lists and tuples are considered equivalent, and the order of [2021-12-10 11:03:14] their elements does not matter. [2021-12-10 11:03:14] """ [2021-12-10 11:03:14] if PRETTY_PRINT: [2021-12-10 11:03:14] expected_str = struct_to_string(expected, EXPECTED_LEN) [2021-12-10 11:03:14] got_str = struct_to_string(got, GOT_LEN) [2021-12-10 11:03:14] else: [2021-12-10 11:03:14] expected_str = repr(expected) [2021-12-10 11:03:14] got_str = repr(got) [2021-12-10 11:03:14] [2021-12-10 11:03:14] if isinstance(expected, tuple): [2021-12-10 11:03:14] expected = list(expected) [2021-12-10 11:03:14] if isinstance(got, tuple): [2021-12-10 11:03:14] got = list(got) [2021-12-10 11:03:14] if isinstance(expected, DN): [2021-12-10 11:03:14] if isinstance(got, str): [2021-12-10 11:03:14] got = DN(got) [2021-12-10 11:03:14] if ( [2021-12-10 11:03:14] not (isinstance(expected, Fuzzy) [2021-12-10 11:03:14] or callable(expected) [2021-12-10 11:03:14] or type(expected) is type(got)) [2021-12-10 11:03:14] ): [2021-12-10 11:03:14] raise AssertionError( [2021-12-10 11:03:14] TYPE % (doc, type(expected), type(got), expected, got, stack) [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] if isinstance(expected, (list, tuple)): [2021-12-10 11:03:14] if len(expected) != len(got): [2021-12-10 11:03:14] > raise AssertionError( [2021-12-10 11:03:14] LEN % (doc, len(expected), len(got), expected_str, got_str, [2021-12-10 11:03:14] stack) [2021-12-10 11:03:14] ) [2021-12-10 11:03:14] E AssertionError: assert_deepequal: list length mismatch. [2021-12-10 11:03:14] E [2021-12-10 11:03:14] E len(expected) = 12 [2021-12-10 11:03:14] E len(got) = 11 [2021-12-10 11:03:14] E expected = ['top', [2021-12-10 11:03:14] E 'person', [2021-12-10 11:03:14] E 'organizationalperson', [2021-12-10 11:03:14] E 'inetorgperson', [2021-12-10 11:03:14] E 'inetuser', [2021-12-10 11:03:14] E 'posixaccount', [2021-12-10 11:03:14] E 'krbprincipalaux', [2021-12-10 11:03:14] E 'krbticketpolicyaux', [2021-12-10 11:03:14] E 'ipaobject', [2021-12-10 11:03:14] E 'ipasshuser', [2021-12-10 11:03:14] E 'ipaSshGroupOfPubKeys', [2021-12-10 11:03:14] E 'ipantuserattrs'] [2021-12-10 11:03:14] E got = ('top', [2021-12-10 11:03:14] E 'person', [2021-12-10 11:03:14] E 'organizationalperson', [2021-12-10 11:03:14] E 'inetorgperson', [2021-12-10 11:03:14] E 'inetuser', [2021-12-10 11:03:14] E 'posixaccount', [2021-12-10 11:03:14] E 'krbprincipalaux', [2021-12-10 11:03:14] E 'krbticketpolicyaux', [2021-12-10 11:03:14] E 'ipaobject', [2021-12-10 11:03:14] E 'ipasshuser', [2021-12-10 11:03:14] E 'ipaSshGroupOfPubKeys') [2021-12-10 11:03:14] E path = ('result', 'objectclass') [2021-12-10 11:03:14] [2021-12-10 11:03:14] util.py:405: AssertionError
Related changes: https://pagure.io/freeipa/issue/8995
Possible approach for fix: https://pagure.io/freeipa/c/2e7396b0e2869e1c5025903cf752e7d90e163a0a
Thanks for the detailed report @slev My bad, I probably missed a few places for this fuzzy objectclass list. I'll work on a patch.
Metadata Update from @frenaud: - Issue assigned to frenaud
Metadata Update from @frenaud: - Issue tagged with: test-failure, tests
Metadata Update from @frenaud: - Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/6125
PR https://github.com/freeipa/freeipa/pull/6125 should address 2 issues out of the 3 reported here.
more failures:
[2021-12-20 17:39:55] =================================== FAILURES =================================== [2021-12-20 17:39:55] ________ TestUserWithUPGDisabled.test_create_where_managed_group_exists ________ [2021-12-20 17:39:55] [2021-12-20 17:39:55] self = <ipatests.test_xmlrpc.test_user_plugin.TestUserWithUPGDisabled object at 0x7ffa2e8595b0> [2021-12-20 17:39:55] user = <ipatests.test_xmlrpc.tracker.user_plugin.UserTracker object at 0x7ffa2e859af0> [2021-12-20 17:39:55] group = <ipatests.test_xmlrpc.tracker.group_plugin.GroupTracker object at 0x7ffa2e854430> [2021-12-20 17:39:55] [2021-12-20 17:39:55] def test_create_where_managed_group_exists(self, user, group): [2021-12-20 17:39:55] """ Create a managed group and then try to create user [2021-12-20 17:39:55] with the same name the group has [2021-12-20 17:39:55] [2021-12-20 17:39:55] As the UPG plugin is disabled, there is no conflict [2021-12-20 17:39:55] """ [2021-12-20 17:39:55] group.create() [2021-12-20 17:39:55] testuser = UserTracker( [2021-12-20 17:39:55] name=group.cn, givenname=u'Test', sn=u'Tuser1', [2021-12-20 17:39:55] gidnumber=1000 [2021-12-20 17:39:55] ) [2021-12-20 17:39:55] testuser.track_create() [2021-12-20 17:39:55] del testuser.attrs['mepmanagedentry'] [2021-12-20 17:39:55] testuser.attrs.update(gidnumber=[u'1000']) [2021-12-20 17:39:55] testuser.attrs.update( [2021-12-20 17:39:55] description=[], [2021-12-20 17:39:55] objectclass=objectclasses.user_base + [u'ipantuserattrs'], [2021-12-20 17:39:55] ) [2021-12-20 17:39:55] command = testuser.make_create_command() [2021-12-20 17:39:55] result = command() [2021-12-20 17:39:55] > testuser.check_create(result, [u'description']) [2021-12-20 17:39:55] [2021-12-20 17:39:55] test_xmlrpc/test_user_plugin.py:871: [2021-12-20 17:39:55] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-20 17:39:55] test_xmlrpc/tracker/user_plugin.py:266: in check_create [2021-12-20 17:39:55] assert_deepequal(dict( [2021-12-20 17:39:55] util.py:436: in assert_deepequal [2021-12-20 17:39:55] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-20 17:39:55] util.py:436: in assert_deepequal [2021-12-20 17:39:55] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-20 17:39:55] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-20 17:39:55] [2021-12-20 17:39:55] expected = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-20 17:39:55] got = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-20 17:39:55] doc = '', stack = ('result', 'objectclass') [2021-12-20 17:39:55] [2021-12-20 17:39:55] def assert_deepequal(expected, got, doc='', stack=tuple()): [2021-12-20 17:39:55] """ [2021-12-20 17:39:55] Recursively check for type and equality. [2021-12-20 17:39:55] [2021-12-20 17:39:55] If a value in expected is callable then it will used as a callback to [2021-12-20 17:39:55] test for equality on the got value. The callback is passed the got [2021-12-20 17:39:55] value and returns True if equal, False otherwise. [2021-12-20 17:39:55] [2021-12-20 17:39:55] If the tests fails, it will raise an ``AssertionError`` with detailed [2021-12-20 17:39:55] information, including the path to the offending value. For example: [2021-12-20 17:39:55] [2021-12-20 17:39:55] >>> expected = [u'Hello', dict(world=1)] [2021-12-20 17:39:55] >>> got = [u'Hello', dict(world=1.0)] [2021-12-20 17:39:55] >>> expected == got [2021-12-20 17:39:55] True [2021-12-20 17:39:55] >>> assert_deepequal( [2021-12-20 17:39:55] ... expected, got, doc='Testing my nested data') # doctest: +ELLIPSIS [2021-12-20 17:39:55] Traceback (most recent call last): [2021-12-20 17:39:55] ... [2021-12-20 17:39:55] AssertionError: assert_deepequal: type(expected) is not type(got). [2021-12-20 17:39:55] Testing my nested data [2021-12-20 17:39:55] type(expected) = <... 'int'> [2021-12-20 17:39:55] type(got) = <... 'float'> [2021-12-20 17:39:55] expected = 1 [2021-12-20 17:39:55] got = 1.0 [2021-12-20 17:39:55] path = (..., 'world') [2021-12-20 17:39:55] [2021-12-20 17:39:55] Note that lists and tuples are considered equivalent, and the order of [2021-12-20 17:39:55] their elements does not matter. [2021-12-20 17:39:55] """ [2021-12-20 17:39:55] if PRETTY_PRINT: [2021-12-20 17:39:55] expected_str = struct_to_string(expected, EXPECTED_LEN) [2021-12-20 17:39:55] got_str = struct_to_string(got, GOT_LEN) [2021-12-20 17:39:55] else: [2021-12-20 17:39:55] expected_str = repr(expected) [2021-12-20 17:39:55] got_str = repr(got) [2021-12-20 17:39:55] [2021-12-20 17:39:55] if isinstance(expected, tuple): [2021-12-20 17:39:55] expected = list(expected) [2021-12-20 17:39:55] if isinstance(got, tuple): [2021-12-20 17:39:55] got = list(got) [2021-12-20 17:39:55] if isinstance(expected, DN): [2021-12-20 17:39:55] if isinstance(got, str): [2021-12-20 17:39:55] got = DN(got) [2021-12-20 17:39:55] if ( [2021-12-20 17:39:55] not (isinstance(expected, Fuzzy) [2021-12-20 17:39:55] or callable(expected) [2021-12-20 17:39:55] or type(expected) is type(got)) [2021-12-20 17:39:55] ): [2021-12-20 17:39:55] raise AssertionError( [2021-12-20 17:39:55] TYPE % (doc, type(expected), type(got), expected, got, stack) [2021-12-20 17:39:55] ) [2021-12-20 17:39:55] if isinstance(expected, (list, tuple)): [2021-12-20 17:39:55] if len(expected) != len(got): [2021-12-20 17:39:55] > raise AssertionError( [2021-12-20 17:39:55] LEN % (doc, len(expected), len(got), expected_str, got_str, [2021-12-20 17:39:55] stack) [2021-12-20 17:39:55] ) [2021-12-20 17:39:55] E AssertionError: assert_deepequal: list length mismatch. [2021-12-20 17:39:55] E [2021-12-20 17:39:55] E len(expected) = 12 [2021-12-20 17:39:55] E len(got) = 11 [2021-12-20 17:39:55] E expected = ['top', [2021-12-20 17:39:55] E 'person', [2021-12-20 17:39:55] E 'organizationalperson', [2021-12-20 17:39:55] E 'inetorgperson', [2021-12-20 17:39:55] E 'inetuser', [2021-12-20 17:39:55] E 'posixaccount', [2021-12-20 17:39:55] E 'krbprincipalaux', [2021-12-20 17:39:55] E 'krbticketpolicyaux', [2021-12-20 17:39:55] E 'ipaobject', [2021-12-20 17:39:55] E 'ipasshuser', [2021-12-20 17:39:55] E 'ipaSshGroupOfPubKeys', [2021-12-20 17:39:55] E 'ipantuserattrs'] [2021-12-20 17:39:55] E got = ('top', [2021-12-20 17:39:55] E 'person', [2021-12-20 17:39:55] E 'organizationalperson', [2021-12-20 17:39:55] E 'inetorgperson', [2021-12-20 17:39:55] E 'inetuser', [2021-12-20 17:39:55] E 'posixaccount', [2021-12-20 17:39:55] E 'krbprincipalaux', [2021-12-20 17:39:55] E 'krbticketpolicyaux', [2021-12-20 17:39:55] E 'ipaobject', [2021-12-20 17:39:55] E 'ipasshuser', [2021-12-20 17:39:55] E 'ipaSshGroupOfPubKeys') [2021-12-20 17:39:55] E path = ('result', 'objectclass') [2021-12-20 17:39:55] [2021-12-20 17:39:55] util.py:405: AssertionError
[2021-12-20 17:13:56] =================================== FAILURES =================================== [2021-12-20 17:13:56] ____________ TestUserWithGroup.test_create_without_upg_with_gid_set ____________ [2021-12-20 17:13:56] [2021-12-20 17:13:56] self = <ipatests.test_xmlrpc.test_user_plugin.TestUserWithGroup object at 0x7f665a12d0a0> [2021-12-20 17:13:56] user_npg2 = <ipatests.test_xmlrpc.tracker.user_plugin.UserTracker object at 0x7f665a232640> [2021-12-20 17:13:56] [2021-12-20 17:13:56] def test_create_without_upg_with_gid_set(self, user_npg2): [2021-12-20 17:13:56] """ Create user without User's Primary GID with GID set [2021-12-20 17:13:56] after default group was changed """ [2021-12-20 17:13:56] command = user_npg2.make_create_command() [2021-12-20 17:13:56] result = command() [2021-12-20 17:13:56] > user_npg2.check_create(result, [u'description', u'memberof_group']) [2021-12-20 17:13:56] [2021-12-20 17:13:56] test_xmlrpc/test_user_plugin.py:762: [2021-12-20 17:13:56] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-20 17:13:56] test_xmlrpc/tracker/user_plugin.py:266: in check_create [2021-12-20 17:13:56] assert_deepequal(dict( [2021-12-20 17:13:56] util.py:436: in assert_deepequal [2021-12-20 17:13:56] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-20 17:13:56] util.py:436: in assert_deepequal [2021-12-20 17:13:56] assert_deepequal(e_sub, g_sub, doc, stack + (key,)) [2021-12-20 17:13:56] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [2021-12-20 17:13:56] [2021-12-20 17:13:56] expected = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-20 17:13:56] got = ['top', 'person', 'organizationalperson', 'inetorgperson', 'inetuser', 'posixaccount', ...] [2021-12-20 17:13:56] doc = '', stack = ('result', 'objectclass') [2021-12-20 17:13:56] [2021-12-20 17:13:56] def assert_deepequal(expected, got, doc='', stack=tuple()): [2021-12-20 17:13:56] """ [2021-12-20 17:13:56] Recursively check for type and equality. [2021-12-20 17:13:56] [2021-12-20 17:13:56] If a value in expected is callable then it will used as a callback to [2021-12-20 17:13:56] test for equality on the got value. The callback is passed the got [2021-12-20 17:13:56] value and returns True if equal, False otherwise. [2021-12-20 17:13:56] [2021-12-20 17:13:56] If the tests fails, it will raise an ``AssertionError`` with detailed [2021-12-20 17:13:56] information, including the path to the offending value. For example: [2021-12-20 17:13:56] [2021-12-20 17:13:56] >>> expected = [u'Hello', dict(world=1)] [2021-12-20 17:13:56] >>> got = [u'Hello', dict(world=1.0)] [2021-12-20 17:13:56] >>> expected == got [2021-12-20 17:13:56] True [2021-12-20 17:13:56] >>> assert_deepequal( [2021-12-20 17:13:56] ... expected, got, doc='Testing my nested data') # doctest: +ELLIPSIS [2021-12-20 17:13:56] Traceback (most recent call last): [2021-12-20 17:13:56] ... [2021-12-20 17:13:56] AssertionError: assert_deepequal: type(expected) is not type(got). [2021-12-20 17:13:56] Testing my nested data [2021-12-20 17:13:56] type(expected) = <... 'int'> [2021-12-20 17:13:56] type(got) = <... 'float'> [2021-12-20 17:13:56] expected = 1 [2021-12-20 17:13:56] got = 1.0 [2021-12-20 17:13:56] path = (..., 'world') [2021-12-20 17:13:56] [2021-12-20 17:13:56] Note that lists and tuples are considered equivalent, and the order of [2021-12-20 17:13:56] their elements does not matter. [2021-12-20 17:13:56] """ [2021-12-20 17:13:56] if PRETTY_PRINT: [2021-12-20 17:13:56] expected_str = struct_to_string(expected, EXPECTED_LEN) [2021-12-20 17:13:56] got_str = struct_to_string(got, GOT_LEN) [2021-12-20 17:13:56] else: [2021-12-20 17:13:56] expected_str = repr(expected) [2021-12-20 17:13:56] got_str = repr(got) [2021-12-20 17:13:56] [2021-12-20 17:13:56] if isinstance(expected, tuple): [2021-12-20 17:13:56] expected = list(expected) [2021-12-20 17:13:56] if isinstance(got, tuple): [2021-12-20 17:13:56] got = list(got) [2021-12-20 17:13:56] if isinstance(expected, DN): [2021-12-20 17:13:56] if isinstance(got, str): [2021-12-20 17:13:56] got = DN(got) [2021-12-20 17:13:56] if ( [2021-12-20 17:13:56] not (isinstance(expected, Fuzzy) [2021-12-20 17:13:56] or callable(expected) [2021-12-20 17:13:56] or type(expected) is type(got)) [2021-12-20 17:13:56] ): [2021-12-20 17:13:56] raise AssertionError( [2021-12-20 17:13:56] TYPE % (doc, type(expected), type(got), expected, got, stack) [2021-12-20 17:13:56] ) [2021-12-20 17:13:56] if isinstance(expected, (list, tuple)): [2021-12-20 17:13:56] if len(expected) != len(got): [2021-12-20 17:13:56] > raise AssertionError( [2021-12-20 17:13:56] LEN % (doc, len(expected), len(got), expected_str, got_str, [2021-12-20 17:13:56] stack) [2021-12-20 17:13:56] ) [2021-12-20 17:13:56] E AssertionError: assert_deepequal: list length mismatch. [2021-12-20 17:13:56] E [2021-12-20 17:13:56] E len(expected) = 12 [2021-12-20 17:13:56] E len(got) = 11 [2021-12-20 17:13:56] E expected = ['top', [2021-12-20 17:13:56] E 'person', [2021-12-20 17:13:56] E 'organizationalperson', [2021-12-20 17:13:56] E 'inetorgperson', [2021-12-20 17:13:56] E 'inetuser', [2021-12-20 17:13:56] E 'posixaccount', [2021-12-20 17:13:56] E 'krbprincipalaux', [2021-12-20 17:13:56] E 'krbticketpolicyaux', [2021-12-20 17:13:56] E 'ipaobject', [2021-12-20 17:13:56] E 'ipasshuser', [2021-12-20 17:13:56] E 'ipaSshGroupOfPubKeys', [2021-12-20 17:13:56] E 'ipantuserattrs'] [2021-12-20 17:13:56] E got = ('top', [2021-12-20 17:13:56] E 'person', [2021-12-20 17:13:56] E 'organizationalperson', [2021-12-20 17:13:56] E 'inetorgperson', [2021-12-20 17:13:56] E 'inetuser', [2021-12-20 17:13:56] E 'posixaccount', [2021-12-20 17:13:56] E 'krbprincipalaux', [2021-12-20 17:13:56] E 'krbticketpolicyaux', [2021-12-20 17:13:56] E 'ipaobject', [2021-12-20 17:13:56] E 'ipasshuser', [2021-12-20 17:13:56] E 'ipaSshGroupOfPubKeys') [2021-12-20 17:13:56] E path = ('result', 'objectclass') [2021-12-20 17:13:56] [2021-12-20 17:13:56] util.py:405: AssertionError
master:
ipa-4-10:
ipa-4-9:
Metadata Update from @frenaud: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.