#6194 Regression found by test: ipa.test_ipaserver.test_ldap.test_ldap.test_Backend
Closed: Fixed None Opened 3 years ago by mbasti.

ipa.test_ipaserver.test_ldap.test_ldap.test_Backend:

    def test_Backend(self):
        """
            Test using the ldap2 Backend directly (ala ipa-server-install)
            """

        # Create our own api because the one generated for the tests is
        # a client-only api. Then we register in the commands and objects
        # we need for the test.
        myapi = create_api(mode=None)
        myapi.bootstrap(context='cli', in_server=True, in_tree=True)
        myapi.add_plugin(ldap2)
        myapi.add_plugin(host)
        myapi.add_plugin(service)
        myapi.add_plugin(service_show)
>       myapi.finalize()

/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipatests/test_ipaserver/test_ldap.py:125: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipalib/plugable.py:707: in finalize
    self.__do_if_not_done('load_plugins')
/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipalib/plugable.py:422: in __do_if_not_done
    getattr(self, name)()
/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipalib/plugable.py:586: in load_plugins
    self.add_package(package)
/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipalib/plugable.py:625: in add_package
    self.add_module(module)
/var/lib/jenkins/workspace/freeipa-intree-tests-f24master/ipalib/plugable.py:642: in add_module
    self.add_plugin(**kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <ipalib.API object at 0x7f5867081890>
plugin = <class 'ipaserver.plugins.host.host'>, override = False
no_fail = False

    def add_plugin(self, plugin, override=False, no_fail=False):
        """
            Add the plugin ``plugin``.

            :param plugin: A subclass of `Plugin` to attempt to add.
            :param override: If true, override an already added plugin.
            """
        if not callable(plugin):
            raise TypeError('plugin must be callable; got %r' % plugin)

        # Find the base class or raise SubclassError:
        for base in plugin.bases:
            if issubclass(base, self.bases):
                break
        else:
            raise errors.PluginSubclassError(
                plugin=plugin,
                bases=self.bases,
            )

        # Check override:
        prev = self.__plugins_by_key.get(plugin.full_name)
        if prev:
            if not override:
                if no_fail:
                    return
                else:
                    # Must use override=True to override:
                    raise errors.PluginOverrideError(
                        base=base.__name__,
                        name=plugin.name,
>                       plugin=plugin,
                    )
E                   PluginOverrideError: unexpected override of LDAPObject.host with <class 'ipaserver.plugins.host.host'>

fixed in bunch
master:

  • 3c32af5 Tests: Failing test_ipalib/test_rpc
  • 774e4e4 Tests: Failing test_ipaserver/test_ldap test
  • ec0a58e Tests: Failing tests in test_ipalib/test_plugable

Metadata Update from @mbasti:
- Issue assigned to lryznaro
- Issue set to the milestone: FreeIPA 4.4.1

2 years ago

Login to comment on this ticket.

Metadata