Clean up the auto generated domain
During the federation test, when creating an identity provider, a new domain will be created as well. This auto generated domain should be cleaned up when test exit. Depends-on: https://review.openstack.org/#/c/628132/ Change-Id: I6dcd0a0154c8658585a98ae138825881fe51d664
This commit is contained in:
parent
958d34ee2d
commit
ddc5109545
@ -43,6 +43,13 @@ class IndentityProvidersTest(base.BaseIdentityTest):
|
||||
def _create_idp(self, idp_id, idp_ref):
|
||||
idp = self.idps_client.create_identity_provider(
|
||||
idp_id, **idp_ref)['identity_provider']
|
||||
if not idp_ref.get('domain_id'):
|
||||
self.addCleanup(
|
||||
self.keystone_manager.domains_client.delete_domain,
|
||||
idp['domain_id'])
|
||||
self.addCleanup(
|
||||
self.keystone_manager.domains_client.update_domain,
|
||||
idp['domain_id'], enabled=False)
|
||||
self.addCleanup(
|
||||
self.idps_client.delete_identity_provider, idp_id)
|
||||
return idp
|
||||
|
@ -50,8 +50,14 @@ class TestSaml2EcpFederatedAuthentication(base.BaseIdentityTest):
|
||||
|
||||
def _setup_idp(self):
|
||||
remote_ids = CONF.fed_scenario.idp_remote_ids
|
||||
self.idps_client.create_identity_provider(
|
||||
idp = self.idps_client.create_identity_provider(
|
||||
self.idp_id, remote_ids=remote_ids, enabled=True)
|
||||
self.addCleanup(
|
||||
self.keystone_manager.domains_client.delete_domain,
|
||||
idp['identity_provider']['domain_id'])
|
||||
self.addCleanup(
|
||||
self.keystone_manager.domains_client.update_domain,
|
||||
idp['identity_provider']['domain_id'], enabled=False)
|
||||
self.addCleanup(
|
||||
self.idps_client.delete_identity_provider, self.idp_id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user