Expose 1501698 bug
Specifying list_limit in [identity] section has no effect on the returned user list size. Related-Bug: 1501698 Change-Id: I7443a7e4c65c2e40c02826b53130738bc7689a07
This commit is contained in:
parent
f481f32460
commit
daf0fb70d0
|
@ -2084,6 +2084,38 @@ class LDAPIdentity(BaseLDAPIdentity, unit.TestCase):
|
|||
self.assertEqual('Foo Bar', user_ref['name'])
|
||||
|
||||
|
||||
class LDAPUserList(unit.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
super(LDAPUserList, self).setUp()
|
||||
self.ldapdb = self.useFixture(ldapdb.LDAPDatabase())
|
||||
|
||||
self.load_backends()
|
||||
self.load_fixtures(default_fixtures)
|
||||
_assert_backends(self,
|
||||
assignment='ldap',
|
||||
identity='ldap',
|
||||
resource='ldap')
|
||||
|
||||
def config_overrides(self):
|
||||
super(LDAPUserList, self).config_overrides()
|
||||
self.config_fixture.config(group='identity', driver='ldap')
|
||||
self.config_fixture.config(group='identity',
|
||||
list_limit=len(default_fixtures.USERS) - 1)
|
||||
|
||||
def config_files(self):
|
||||
config_files = super(LDAPUserList, self).config_files()
|
||||
config_files.append(unit.dirs.tests_conf('backend_ldap.conf'))
|
||||
return config_files
|
||||
|
||||
def test_returned_list_size_is_limited(self):
|
||||
users = self.identity_api.list_users()
|
||||
# NOTE(amakarov): this exposes bug 1501698
|
||||
# list_limit number of entries should be returned
|
||||
self.assertNotEqual(CONF.identity.list_limit, len(users))
|
||||
self.assertEqual(len(default_fixtures.USERS), len(users))
|
||||
|
||||
|
||||
class LDAPIdentityEnabledEmulation(LDAPIdentity):
|
||||
def setUp(self):
|
||||
super(LDAPIdentityEnabledEmulation, self).setUp()
|
||||
|
|
Loading…
Reference in New Issue