diff --git a/ranger_tempest_plugin/tests/api/base.py b/ranger_tempest_plugin/tests/api/base.py index 3f1a7a4..f7da4ee 100755 --- a/ranger_tempest_plugin/tests/api/base.py +++ b/ranger_tempest_plugin/tests/api/base.py @@ -56,48 +56,10 @@ class BaseOrmTest(test.BaseTestCase): try: # check if ranger region exists cls.region_client.get_region(CONF.identity.region) - except exceptions.Unauthorized: - # create region for testing if it doesnt exist - cls.region_client.create_region( - **{'id': CONF.identity.region, - 'name': CONF.identity.region, - "locationType": "Floor", - "vlcpName": CONF.identity.region, - 'description': 'region for testing', - 'status': 'functional', - 'rangerAgentVersion': '3.0', - 'OSVersion': 'stein', - 'CLLI': '12345', - 'address': {'country': 'This', 'state': 'region', - 'city': 'is for', 'street': 'test', - 'zip': 'purposes'}, - 'metadata': {}, - 'designType': 'large', - 'domainName': CONF.auth.admin_domain_name, - 'endpoints': [{ - 'publicURL': - 'https://dashboard-nc.%s.cci.att.com' - % CONF.identity.region, - 'type': 'dashboard' - }, { - 'publicURL': cls.identity_url, - 'type': 'identity' - }, { - 'publicURL': - ('https://ranger-agent-nc.%s.cci.att.com' - % CONF.identity.region), - 'type': 'ord' - }]}) - except (exceptions.UnexpectedResponseCode, exceptions.NotFound) as e: - raise cls.skipException( - "Test skipped, Ranger region unavailable") from e - except Exception as exp: - if "ConnectionError" in str(exp): - skip_msg = "Tests skipped, Ranger unavailable: {}".format( - str(exp)) - raise cls.skipException(skip_msg) - raise exp + skip_msg = "Ranger services unavailable: {}".format( + str(exp)) + raise cls.skipException(skip_msg) try: # alt_region_available is True, skip tests and warn