Fix nits from domain specific roles CRUD support
In change I74a8403a7bda271342708d282fd3f3f8aae63dc9, two comments suggested fixing a typo and adding another test case. This change address them. Change-Id: Ibfc2bfc8df5fb03b10386c8918691487be4bc81f
This commit is contained in:
parent
0cb07ce9e3
commit
b2c239545f
|
@ -21,7 +21,7 @@ from keystone import exception
|
|||
# multi-process configurations, it is better to still use a sql uniqueness
|
||||
# constraint. Since the support for a nullable component of a uniqueness
|
||||
# constraint across different sql databases is mixed, we instead store a
|
||||
# special value to represent null, as defined in NULL_DOMAIN_ID beloe.
|
||||
# special value to represent null, as defined in NULL_DOMAIN_ID below.
|
||||
NULL_DOMAIN_ID = '<<null>>'
|
||||
|
||||
|
||||
|
|
|
@ -73,6 +73,12 @@ class SqlRole(core_sql.BaseBackendSqlTests, core.RoleTests):
|
|||
self.role_api.update_role,
|
||||
role2['id'],
|
||||
role2)
|
||||
# Now try to make it global
|
||||
role2['domain_id'] = None
|
||||
self.assertRaises(exception.ValidationError,
|
||||
self.role_api.update_role,
|
||||
role2['id'],
|
||||
role2)
|
||||
|
||||
def test_domain_specific_separation(self):
|
||||
domain1 = unit.new_domain_ref()
|
||||
|
|
Loading…
Reference in New Issue