Merge "Update IdP sql model"
This commit is contained in:
commit
400263ed2b
@ -55,7 +55,8 @@ class IdentityProviderModel(sql.ModelBase, sql.ModelDictMixin):
|
|||||||
mutable_attributes = frozenset(['description', 'enabled', 'remote_ids'])
|
mutable_attributes = frozenset(['description', 'enabled', 'remote_ids'])
|
||||||
|
|
||||||
id = sql.Column(sql.String(64), primary_key=True)
|
id = sql.Column(sql.String(64), primary_key=True)
|
||||||
domain_id = sql.Column(sql.String(64), nullable=False, unique=True)
|
domain_id = sql.Column(sql.String(64), sql.ForeignKey('project.id'),
|
||||||
|
nullable=False)
|
||||||
enabled = sql.Column(sql.Boolean, nullable=False)
|
enabled = sql.Column(sql.Boolean, nullable=False)
|
||||||
description = sql.Column(sql.Text(), nullable=True)
|
description = sql.Column(sql.Text(), nullable=True)
|
||||||
remote_ids = orm.relationship('IdPRemoteIdsModel',
|
remote_ids = orm.relationship('IdPRemoteIdsModel',
|
||||||
|
@ -45,6 +45,7 @@ from keystone.tests.unit import federation_fixtures
|
|||||||
from keystone.tests.unit import ksfixtures
|
from keystone.tests.unit import ksfixtures
|
||||||
from keystone.tests.unit import mapping_fixtures
|
from keystone.tests.unit import mapping_fixtures
|
||||||
from keystone.tests.unit import test_v3
|
from keystone.tests.unit import test_v3
|
||||||
|
from keystone.tests.unit import utils as test_utils
|
||||||
from keystone.token.providers import common as token_common
|
from keystone.token.providers import common as token_common
|
||||||
|
|
||||||
|
|
||||||
@ -993,6 +994,9 @@ class FederatedIdentityProviderTests(test_v3.RestfulTestCase):
|
|||||||
# since it wasn't auto-generated
|
# since it wasn't auto-generated
|
||||||
self.assertIsNotNone(PROVIDERS.resource_api.get_domain(domain['id']))
|
self.assertIsNotNone(PROVIDERS.resource_api.get_domain(domain['id']))
|
||||||
|
|
||||||
|
@test_utils.wip("Keystone never supported IdP:domain = 1:1. This test "
|
||||||
|
"should be fixed to make sure IdP:domain is n:1",
|
||||||
|
bug='1760843')
|
||||||
def test_create_idp_domain_id_unique_constraint(self):
|
def test_create_idp_domain_id_unique_constraint(self):
|
||||||
# create domain and add domain_id to keys to check
|
# create domain and add domain_id to keys to check
|
||||||
domain = unit.new_domain_ref()
|
domain = unit.new_domain_ref()
|
||||||
|
Loading…
Reference in New Issue
Block a user