Remove Ranger region create, catch all errrors
Remove ranger region create in favor of charts performing needed creation. All errors when ranger tempest attempts to get region from ranger now mean that Ranger is not available and we should skip all tests Change-Id: Ideb968aeece89b177c591408dbba78a7c2f9e916
This commit is contained in:
parent
37ea690c81
commit
bd5acac654
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user