summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functest/opnfv_tests/openstack/tempest/conf_utils.py2
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py10
-rw-r--r--functest/opnfv_tests/vnf/ims/heat_ims.py3
-rw-r--r--functest/tests/unit/openstack/tempest/test_tempest.py3
4 files changed, 8 insertions, 10 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/conf_utils.py b/functest/opnfv_tests/openstack/tempest/conf_utils.py
index 338fa51ca..bf1a193b6 100644
--- a/functest/opnfv_tests/openstack/tempest/conf_utils.py
+++ b/functest/opnfv_tests/openstack/tempest/conf_utils.py
@@ -216,6 +216,8 @@ def configure_tempest_update_params(
rconfig.set('identity-feature-enabled', 'api_v2', False)
else:
auth_version = 'v2'
+ if env.get("NEW_USER_ROLE").lower() != "member":
+ rconfig.set('auth', 'tempest_roles', env.get("NEW_USER_ROLE"))
rconfig.set('identity', 'auth_version', auth_version)
rconfig.set(
'validation', 'ssh_timeout',
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 4f8002e26..542ed9ed0 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -167,19 +167,15 @@ class TempestCommon(singlevm.VmReady1):
result_file = open(self.list, 'w')
black_tests = []
try:
- installer_type = env.get('INSTALLER_TYPE')
deploy_scenario = env.get('DEPLOY_SCENARIO')
- if bool(installer_type) * bool(deploy_scenario):
- # if INSTALLER_TYPE and DEPLOY_SCENARIO are set we read the
- # file
+ if bool(deploy_scenario):
+ # if DEPLOY_SCENARIO is set we read the file
black_list_file = open(conf_utils.TEMPEST_BLACKLIST)
black_list_yaml = yaml.safe_load(black_list_file)
black_list_file.close()
for item in black_list_yaml:
scenarios = item['scenarios']
- installers = item['installers']
- if (deploy_scenario in scenarios and
- installer_type in installers):
+ if deploy_scenario in scenarios:
tests = item['tests']
for test in tests:
black_tests.append(test)
diff --git a/functest/opnfv_tests/vnf/ims/heat_ims.py b/functest/opnfv_tests/vnf/ims/heat_ims.py
index 7ad1e96bf..3d32b889d 100644
--- a/functest/opnfv_tests/vnf/ims/heat_ims.py
+++ b/functest/opnfv_tests/vnf/ims/heat_ims.py
@@ -217,6 +217,9 @@ class HeatIms(singlevm.VmReady2):
try:
if self.stack:
self.cloud.delete_stack(self.stack.id, wait=True)
+ except TypeError:
+ # shade raises TypeError exceptions when checking stack status
+ pass
except Exception: # pylint: disable=broad-except
self.__logger.exception("Cannot clean stack ressources")
super(HeatIms, self).clean()
diff --git a/functest/tests/unit/openstack/tempest/test_tempest.py b/functest/tests/unit/openstack/tempest/test_tempest.py
index 23dcd6c75..a542bbb25 100644
--- a/functest/tests/unit/openstack/tempest/test_tempest.py
+++ b/functest/tests/unit/openstack/tempest/test_tempest.py
@@ -116,7 +116,6 @@ class OSTempestTesting(unittest.TestCase):
mock.patch.object(self.tempestcommon, 'read_file',
return_value=['test1', 'test2']):
conf_utils.TEMPEST_BLACKLIST = Exception
- os.environ['INSTALLER_TYPE'] = 'installer_type'
os.environ['DEPLOY_SCENARIO'] = 'deploy_scenario'
self.tempestcommon.apply_tempest_blacklist()
obj = mock_open()
@@ -132,7 +131,6 @@ class OSTempestTesting(unittest.TestCase):
@mock.patch("os.path.exists", return_value=True)
def test_apply_blacklist_default(self, *args):
item_dict = {'scenarios': ['deploy_scenario'],
- 'installers': ['installer_type'],
'tests': ['test2']}
with mock.patch('six.moves.builtins.open',
mock.mock_open()) as mock_open, \
@@ -140,7 +138,6 @@ class OSTempestTesting(unittest.TestCase):
return_value=['test1', 'test2']), \
mock.patch('functest.opnfv_tests.openstack.tempest.tempest.'
'yaml.safe_load', return_value=item_dict):
- os.environ['INSTALLER_TYPE'] = 'installer_type'
os.environ['DEPLOY_SCENARIO'] = 'deploy_scenario'
self.tempestcommon.apply_tempest_blacklist()
obj = mock_open()