Fixed region domainName update in class setup process

During setup of ranger tempest test runs, an update
statement is ran which updates ranger regions to
the appropriate testing domain as defined by
tempest.conf. This update statement has been updated
to target only the sites being used for that particular
ranger tempest test run. Also fixed typo in IMS test.

Change-Id: I4ebdc7fd21cebb23e8033a066bbd90d26f76bb50
This commit is contained in:
jh629g 2020-05-28 09:41:56 -05:00 committed by Jeremy Houser
parent 4ccd35516f
commit 78f191ddbb
2 changed files with 7 additions and 5 deletions

View File

@ -46,13 +46,15 @@ class BaseOrmTest(test.BaseTestCase):
regions = [x for x in regions_list['regions']]
for region in regions:
if region['domainName'] != CONF.auth.admin_domain_name:
region['domainName'] = CONF.auth.admin_domain_name
cls.region_client.update_region(region['id'],
**region)
if region['id'] is CONF.identity.region or \
region['id'] is CONF.ranger.alt_region:
cls.addClassResourceCleanup(cls.region_client.update_region,
region['id'],
**region)
region['domainName'] = CONF.auth.admin_domain_name
cls.region_client.update_region(region['id'],
**region)
super(BaseOrmTest, cls).setup_clients()
@classmethod

View File

@ -318,7 +318,7 @@ class TestTempestIms(ims_base.ImsBaseOrmTest):
self.assertIn('id', body['image'])
_, body = self.client.get_image(image['id'])
self.assertEqual(body['image']['id'], image['id'])
self.assertEqual(body['image']['regions'][0]['status'], 'success')
self.assertEqual(body['image']['regions'][0]['status'], 'Success')
self._update_region(CONF.identity.region)
@SYNC('region')