Merge "Fix incorrect signature in federation legacy V8 wrapper"
This commit is contained in:
@@ -226,12 +226,14 @@ class FederationDriverBase(object):
|
||||
raise exception.NotImplemented() # pragma: no cover
|
||||
|
||||
@abc.abstractmethod
|
||||
def create_mapping(self, mapping_ref):
|
||||
def create_mapping(self, mapping_id, mapping):
|
||||
"""Create a mapping.
|
||||
|
||||
:param mapping_ref: mapping ref with mapping name
|
||||
:type mapping_ref: dict
|
||||
:returns: mapping_ref
|
||||
:param mapping_id: id of mapping ref
|
||||
:type mapping_id: string
|
||||
:param mapping: mapping ref with mapping name
|
||||
:type mapping: dict
|
||||
:returns: mapping ref
|
||||
|
||||
"""
|
||||
raise exception.NotImplemented() # pragma: no cover
|
||||
@@ -473,8 +475,8 @@ class V9FederationWrapperForV8Driver(FederationDriverV9):
|
||||
def delete_protocol(self, idp_id, protocol_id):
|
||||
self.driver.delete_protocol(idp_id, protocol_id)
|
||||
|
||||
def create_mapping(self, mapping_ref):
|
||||
return self.driver.create_mapping(mapping_ref)
|
||||
def create_mapping(self, mapping_id, mapping):
|
||||
return self.driver.create_mapping(mapping_id, mapping)
|
||||
|
||||
def delete_mapping(self, mapping_id):
|
||||
self.driver.delete_mapping(mapping_id)
|
||||
|
@@ -13,19 +13,42 @@
|
||||
from keystone.tests.unit import test_v3_federation
|
||||
|
||||
|
||||
class FederatedIdentityProviderTestsV8(
|
||||
test_v3_federation.FederatedIdentityProviderTests):
|
||||
"""Test that a V8 driver still passes the same tests.
|
||||
|
||||
We use the SQL driver as an example of a V8 legacy driver.
|
||||
|
||||
"""
|
||||
|
||||
def config_overrides(self):
|
||||
super(FederatedIdentityProviderTestsV8, self).config_overrides()
|
||||
# V8 SQL specific driver overrides
|
||||
class FederatedSetupMixinV8(object):
|
||||
def useV8driver(self):
|
||||
# We use the SQL driver as an example V8 driver, so override
|
||||
# the current driver with that version.
|
||||
self.config_fixture.config(
|
||||
group='federation',
|
||||
driver='keystone.federation.V8_backends.sql.Federation')
|
||||
self.use_specific_sql_driver_version(
|
||||
'keystone.federation', 'backends', 'V8_')
|
||||
|
||||
|
||||
class FederatedIdentityProviderTestsV8(
|
||||
test_v3_federation.FederatedIdentityProviderTests,
|
||||
FederatedSetupMixinV8):
|
||||
"""Test that a V8 driver still passes the same tests."""
|
||||
|
||||
def config_overrides(self):
|
||||
super(FederatedIdentityProviderTestsV8, self).config_overrides()
|
||||
self.useV8driver()
|
||||
|
||||
|
||||
class MappingCRUDTestsV8(
|
||||
test_v3_federation.MappingCRUDTests,
|
||||
FederatedSetupMixinV8):
|
||||
"""Test that a V8 driver still passes the same tests."""
|
||||
|
||||
def config_overrides(self):
|
||||
super(MappingCRUDTestsV8, self).config_overrides()
|
||||
self.useV8driver()
|
||||
|
||||
|
||||
class ServiceProviderTestsV8(
|
||||
test_v3_federation.ServiceProviderTests,
|
||||
FederatedSetupMixinV8):
|
||||
"""Test that a V8 driver still passes the same tests."""
|
||||
|
||||
def config_overrides(self):
|
||||
super(ServiceProviderTestsV8, self).config_overrides()
|
||||
self.useV8driver()
|
||||
|
Reference in New Issue
Block a user