diff --git a/keystone/tests/test_backend.py b/keystone/tests/test_backend.py index dc807a0a57..2f6fde410d 100644 --- a/keystone/tests/test_backend.py +++ b/keystone/tests/test_backend.py @@ -3671,6 +3671,13 @@ class IdentityTests(object): {'description': uuid.uuid4().hex}) # If the previous line didn't raise an exception then the test passes. + def test_update_role_same_name(self): + # A user can update a role and set the name to be the same as it was. + + self.assignment_api.update_role(self.role_member['id'], + {'name': self.role_member['name']}) + # If the previous line didn't raise an exception then the test passes. + class TokenTests(object): def _create_token_id(self): diff --git a/keystone/tests/test_backend_ldap.py b/keystone/tests/test_backend_ldap.py index 76b52fc830..7a4e11185c 100644 --- a/keystone/tests/test_backend_ldap.py +++ b/keystone/tests/test_backend_ldap.py @@ -1916,6 +1916,14 @@ class LDAPIdentity(BaseLDAPIdentity, tests.TestCase): self.assertEqual('crap', user_ref['id']) self.assertEqual('Foo Bar', user_ref['name']) + def test_update_role_same_name(self): + # Override + # This test is failing using the LDAP assignment backend, see + # bug 1401721. + # FIXME(blk-u): This should work. + self.assertRaises(exception.Conflict, + super(LDAPIdentity, self).test_update_role_same_name) + class LDAPIdentityEnabledEmulation(LDAPIdentity): def setUp(self):