HUE-8053 Fix unit test

Review Request #12634 - Created March 12, 2018 and submitted

Ying Chen
enricoberti, jgauthier, johan, ranade, romain, test, weixia
commit 8637cd66d34b65da6e2c9d4135f2a59b4c667162 (HEAD -> HUE-8053-ldap, origin/HUE-8053-ldap)
Author: Ying Chen <>
Date:   Mon Mar 12 13:46:01 2018 -0700

    HUE-8053 Fix unit test

:100644 100644 a04aba7740... ff5046227c... M    apps/useradmin/src/useradmin/
:100644 100644 1f4b4bd0da... 17cdc5a582... M    apps/useradmin/src/useradmin/
Hue-Build-Master/312/ Test is OK
  • 0
  • 0
  • 2
  • 2
  • 4
Description From Last Updated
  1. Better commit name possible?

  2. apps/useradmin/src/useradmin/ (Diff revision 1)

    Isn't the actual problem that we don't test for server is none anymore?

    Seems like multi LDAP support for LdapSynchronization is not properly implemented yet?

    1. So far, I had seen two use cases for _import_ldap_users_info()
      1. When hue.ini has sync_groups_on_login=true, and 'server' also get value, so ldap_config = desktop.conf.LDAP.LDAP_SERVERS.get()[server] is ok
      2. Run "Sync LDAP users and groups" as superuser from user, it will come to
         In this case, sync_groups is False and server is None, so ldap_config = desktop.conf.LDAP.LDAP_SERVERS.get()[server] is ok
         and it also will separately called groups = sync_ldap_groups(connection, failed_users=failed_users)
      3. Unit test from, which trigger the call to useradmin.middleware.LdapSynchronizationMiddleware
      I think that we just need to fix the case #3.
  3. We never do this in the non test world? Why would it be test specific?

    1. The useradmin.middleware.LdapSynchronizationMiddleware is only getting called by: 
  4. Better name possible?

  2. Add note?: Used by tests only

Review request changed

Status: Closed (submitted)